Exclusive Furniture Collection Slider
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>Furniture Shop Slider</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> </head> <body> <section class="slider-container"> <h2 class="slider-heading">Exclusive Furniture Collection</h2> <div class="slider-wrapper" id="slider"> <!-- Slide 1 --> <div class="slide"> <div class="product-card"> <img src="https://images.unsplash.com/photo-1616486338812-3dadae4b4ace?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTJ8fGZ1cm5pdHVyZXxlbnwwfHwwfHx8MA%3D%3D" alt="Luxury Sofa"> <div class="product-info"> <h3>Luxury Sofa Set</h3> <p>Premium 3-piece sofa set designed with comfort & elegance. Perfect for a modern living room.</p> <div class="price">$1,200</div> <a href="#" class="btn-custom">Shop Now</a> </div> </div> </div> <!-- Slide 2 --> <div class="slide"> <div class="product-card"> <img src="https://plus.unsplash.com/premium_photo-1684338795288-097525d127f0?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTB8fGZ1cm5pdHVyZXxlbnwwfHwwfHx8MA%3D%3D" alt="Dining Table"> <div class="product-info"> <h3>Modern Dining Table</h3> <p>Beautiful 6-seater dining table crafted with solid wood and a sleek design.</p> <div class="price">$950</div> <a href="#" class="btn-custom">Shop Now</a> </div> </div> </div> <!-- Slide 3 --> <div class="slide"> <div class="product-card"> <img src="https://plus.unsplash.com/premium_photo-1683120852623-143817d6400b?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Nnx8YmVkcm9vbXxlbnwwfHwwfHx8MA%3D%3D" alt="King Size Bed"> <div class="product-info"> <h3>King Size Bed</h3> <p>Stylish king-size bed frame with headboard design. Built for durability and style.</p> <div class="price">$1,500</div> <a href="#" class="btn-custom">Shop Now</a> </div> </div> </div> </div> <!-- Buttons --> <button class="nav-btn prev" onclick="moveSlide(-1)"><i class="fas fa-chevron-left"></i></button> <button class="nav-btn next" onclick="moveSlide(1)"><i class="fas fa-chevron-right"></i></button> </section> </body> </html>
CSS
body { margin: 0; font-family: "Poppins", sans-serif; background: linear-gradient(135deg, #ece9e6, #ffffff); } .slider-container { width: 100%; overflow: hidden; position: relative; padding: 60px 0; } .slider-heading { text-align: center; font-size: 2.8rem; font-weight: 700; color: #d35400; margin-bottom: 40px; /* text-transform: uppercase; */ letter-spacing: 2px; } .slider-wrapper { display: flex; transition: transform 0.6s ease-in-out; } .slide { min-width: 100%; display: flex; justify-content: center; align-items: center; gap: 40px; padding: 20px; } .product-card { background: rgba(255,255,255,0.8); backdrop-filter: blur(10px); border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.1); max-width: 900px; display: flex; overflow: hidden; transition: transform 0.4s ease; } .product-card:hover { transform: translateY(-10px); } .product-card img { width: 400px; height: 350px; object-fit: cover; } .product-info { padding: 25px; flex: 1; } .product-info h3 { font-size: 2rem; font-weight: 700; margin-bottom: 10px; color: #34495e; } .product-info p { font-size: 1rem; color: #666; margin-bottom: 20px; line-height: 1.6; } .price { font-size: 1.5rem; font-weight: 600; color: #27ae60; margin-bottom: 20px; } .btn-custom { background: #e67e22; color: #fff; font-weight: 600; border-radius: 30px; padding: 12px 28px; text-decoration: none; transition: all 0.3s ease; } .btn-custom:hover { background: #d35400; } /* Navigation */ .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2rem; background: rgba(0,0,0,0.5); color: #fff; border: none; padding: 10px 18px; cursor: pointer; border-radius: 50%; z-index: 2; transition: 0.3s; } .nav-btn:hover { background: rgba(0,0,0,0.7); } .prev { left: 20px; } .next { right: 20px; } @media(max-width: 900px) { .product-card { flex-direction: column; max-width: 95%; } .product-card img { width: 100%; height: 250px; } }
JavaScript
let currentIndex = 0; const slides = document.querySelectorAll(".slide"); const totalSlides = slides.length; function moveSlide(direction) { currentIndex = (currentIndex + direction + totalSlides) % totalSlides; document.getElementById("slider").style.transform = `translateX(-${currentIndex * 100}%)`; } // Auto slide setInterval(() => { moveSlide(1); }, 4000);
Output Preview
Desktop
Mobile
Fullscreen