Animated Flip Gallery - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Animated Flip Gallery</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css"> <style> body { font-family: 'Arial', sans-serif; background-color: #f8f8f8; margin: 0; padding: 20px; } .flip-gallery { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; } .flip-gallery .item { position: relative; overflow: hidden; cursor: pointer; width: 200px; height: 300px; perspective: 1000px; } .flip-gallery .item .inner { position: absolute; width: 100%; height: 100%; transition: transform 0.6s; transform-style: preserve-3d; } .flip-gallery .item:hover .inner { transform: rotateY(180deg); } .flip-gallery .front, .flip-gallery .back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; border-radius: 10px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); } .flip-gallery .front { background-color: #fff; } .flip-gallery .front img { width: 100%; height: auto; display: block; border-radius: 10px; } .flip-gallery .back { background-color: #333; color: #fff; display: flex; justify-content: center; align-items: center; transform: rotateY(180deg); } h1{ text-align: center; } </style> </head> <body> <h1>✨ Animated Flip Gallery ✨</h1> <div class="flip-gallery"> <div class="item"> <div class="inner"> <div class="front"> <img src="https://via.placeholder.com/300" alt="Gallery Image 1"> </div> <div class="back"> <p>More Info</p> </div> </div> </div> <div class="item"> <div class="inner"> <div class="front"> <img src="https://via.placeholder.com/300" alt="Gallery Image 2"> </div> <div class="back"> <p>More Info</p> </div> </div> </div> <div class="item"> <div class="inner"> <div class="front"> <img src="https://via.placeholder.com/300" alt="Gallery Image 3"> </div> <div class="back"> <p>More Info</p> </div> </div> </div> </div> </body> </html>