Car Showroom Gallery
Preview
Edit
Download
Run
Download Options
HTML File
Download as .html file
CSS File
Download as .css file
JavaScript File
Download as .js file
Combined HTML
All code in one HTML file
Project ZIP
All files in a ZIP archive
Cancel
HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Car Showroom Gallery</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <section class="gallery-section"> <h2>Car Showroom Gallery</h2> <p class="twhite"> Explore our premium car showroom. From latest models to luxury cars, experience top-notch vehicles in a modern, elegant setting. </p> <div class="container"> <div class="gallery-container"> <div class="gallery-card"> <img src="https://images.unsplash.com/photo-1583121274602-3e2820c69888?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8Y2Fyc3xlbnwwfHwwfHx8MA%3D%3D" alt="Luxury Sedan"> <div class="gallery-info"> <h4>Luxury Sedan</h4> <p>Elegant interiors and sleek design</p> </div> </div> <div class="gallery-card"> <img src="https://images.unsplash.com/photo-1552519507-da3b142c6e3d?w=900" alt="Sports Car"> <div class="gallery-info"> <h4>Sports Car</h4> <p>High performance and style</p> </div> </div> <div class="gallery-card"> <img src="https://images.unsplash.com/photo-1494976388531-d1058494cdd8?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTN8fGNhcnN8ZW58MHx8MHx8fDA%3D" alt="SUV Collection"> <div class="gallery-info"> <h4>SUV Collection</h4> <p>Comfortable and spacious rides</p> </div> </div> <div class="gallery-card"> <img src="https://plus.unsplash.com/premium_photo-1661281299306-38c2d70467ea?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MXx8Y2FyJTIwc2hvd3Jvb218ZW58MHx8MHx8fDA%3D" alt="Showroom Interior"> <div class="gallery-info"> <h4>Showroom Interior</h4> <p>Modern, spacious, and luxurious</p> </div> </div> <div class="gallery-card"> <img src="https://images.unsplash.com/photo-1692406069831-0bb7ea297645?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8Y2FyJTIwc2hvd3Jvb218ZW58MHx8MHx8fDA%3D" alt="Convertible Cars"> <div class="gallery-info"> <h4>Convertible Cars</h4> <p>Drive with style and elegance</p> </div> </div> <div class="gallery-card"> <img src="https://plus.unsplash.com/premium_photo-1682089485470-4d575051f326?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Nnx8Y2FyJTIwc2hvd3Jvb218ZW58MHx8MHx8fDA%3D" alt="Electric Cars"> <div class="gallery-info"> <h4>Electric Cars</h4> <p>Eco-friendly and modern technology</p> </div> </div> </div> </div> </section> </body> </html>
CSS
body { font-family: 'Poppins', sans-serif; background: #f8f9fa; color: #333; } .gallery-section { padding: 90px 20px; text-align: center; background: #f8f9fa; } .gallery-section h2 { font-size: 2.8rem; font-weight: 700; color: #2c3e50; margin-bottom: 15px; } .gallery-section p { font-size: 1.15rem; color: #ffffff; max-width: 750px; margin: 0 auto 50px; } .twhite { color: #2c3e50 !important; } .gallery-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; } .gallery-card { position: relative; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 8px 25px rgba(0,0,0,0.12); transition: transform 0.5s ease, box-shadow 0.5s ease; opacity: 0; transform: translateY(60px); } .gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; } .gallery-card:hover img { transform: scale(1.1); } .gallery-card:hover { transform: translateY(-12px); box-shadow: 0 16px 35px rgba(0,0,0,0.25); } .gallery-info { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(44,62,80,0.85), rgba(44,62,80,0)); color: #fff; padding: 20px; text-align: left; } .gallery-info h4 { margin: 0; font-size: 1.25rem; font-weight: 600; } .gallery-info p { margin: 5px 0 0; opacity: 0.95; font-size: 0.95rem; }
JavaScript
// Scroll animation using IntersectionObserver const cards = document.querySelectorAll('.gallery-card'); const observer = new IntersectionObserver(entries => { entries.forEach(entry => { if(entry.isIntersecting){ entry.target.style.opacity = '1'; entry.target.style.transform = 'translateY(0)'; observer.unobserve(entry.target); } }); }, { threshold: 0.2 }); cards.forEach(card => observer.observe(card));
Output Preview
Desktop
Mobile
Fullscreen