Shoe 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>Premium Shoe Collection</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> </head> <body> <div class="slider-container"> <div class="slider"> <!-- Slide 1 --> <div class="slide active"> <div class="shoe-image"> <img src="https://images.unsplash.com/photo-1542291026-7eec264c27ff?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8c2hvZXN8ZW58MHx8MHx8fDA%3D&auto=format&fit=crop&w=500&q=60" alt="Nike Air Max"> </div> <div class="shoe-info"> <h2>Nike Air Max 270</h2> <p>Experience ultimate comfort with the revolutionary Air Max technology. Designed for all-day wear with a modern, stylish look that complements any outfit.</p> <div class="price">$149.99</div> <div class="features"> <span class="feature">Air Cushioning</span> <span class="feature">Breathable</span> <span class="feature">Lightweight</span> </div> <button class="btn">Add to Cart</button> </div> </div> <!-- Slide 2 --> <div class="slide"> <div class="shoe-image"> <img src="https://images.unsplash.com/photo-1600185365483-26d7a4cc7519?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8OHx8c2hvZXN8ZW58MHx8MHx8fDA%3D&auto=format&fit=crop&w=500&q=60" alt="Adidas Ultraboost"> </div> <div class="shoe-info"> <h2>Adidas Ultraboost 22</h2> <p>Boost your running performance with responsive cushioning and adaptive fit. The perfect combination of style, comfort, and performance technology.</p> <div class="price">$179.99</div> <div class="features"> <span class="feature">Boost Technology</span> <span class="feature">Primeknit Upper</span> <span class="feature">Energy Return</span> </div> <button class="btn">Add to Cart</button> </div> </div> <!-- Slide 3 --> <div class="slide"> <div class="shoe-image"> <img src="https://images.unsplash.com/photo-1606107557195-0e29a4b5b4aa?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8Nnx8c2hvZXN8ZW58MHx8MHx8fDA%3D&auto=format&fit=crop&w=500&q=60" alt="Puma RS-X"> </div> <div class="shoe-info"> <h2>Puma RS-X Reinvention</h2> <p>Bold colors and chunky silhouette define this retro-inspired sneaker. With advanced cushioning and durable construction for everyday wear.</p> <div class="price">$119.99</div> <div class="features"> <span class="feature">Retro Design</span> <span class="feature">RS Cushioning</span> <span class="feature">Durable</span> </div> <button class="btn">Add to Cart</button> </div> </div> </div> <!-- Navigation Buttons --> <div class="nav-btn prev"> <i class="fas fa-chevron-left"></i> </div> <div class="nav-btn next"> <i class="fas fa-chevron-right"></i> </div> <!-- Dots Indicator --> <div class="slider-controls"> <div class="slider-dot active"></div> <div class="slider-dot"></div> <div class="slider-dot"></div> </div> </div> </body> </html>
CSS
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } body { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #fff; min-height: 100vh; display: flex; justify-content: center; align-items: center; padding: 20px; } .slider-container { max-width: 1200px; width: 100%; position: relative; overflow: hidden; border-radius: 20px; box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5); } .slider { display: flex; transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); height: 600px; } .slide { min-width: 100%; position: relative; display: flex; align-items: center; padding: 40px; background: linear-gradient(to right, #0f0c29, #302b63, #24243e); overflow: hidden; } .slide::before { content: ''; position: absolute; top: -50%; right: -50%; width: 100%; height: 200%; background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%); transform: rotate(30deg); } .shoe-image { flex: 1; display: flex; justify-content: center; align-items: center; position: relative; z-index: 2; } .shoe-image img { max-width: 90%; max-height: 500px; transform: rotate(-20deg); filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5)); transition: transform 0.5s ease; } .slide.active .shoe-image img { transform: rotate(-10deg) translateY(-10px); animation: float 3s ease-in-out infinite; } @keyframes float { 0%, 100% { transform: rotate(-10deg) translateY(0); } 50% { transform: rotate(-10deg) translateY(-15px); } } .shoe-info { flex: 1; padding: 30px; z-index: 2; } .shoe-info h2 { font-size: 2.8rem; margin-bottom: 15px; background: linear-gradient(to right, #ff8a00, #da1b60); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 2px 10px rgba(218, 27, 96, 0.3); } .shoe-info p { font-size: 1.1rem; line-height: 1.6; margin-bottom: 25px; color: #e0e0e0; } .price { font-size: 2.2rem; font-weight: bold; margin-bottom: 25px; color: #4cc9f0; } .features { display: flex; gap: 15px; margin-bottom: 30px; } .feature { background: rgba(255, 255, 255, 0.1); padding: 8px 15px; border-radius: 20px; font-size: 0.9rem; backdrop-filter: blur(5px); } .btn { display: inline-block; padding: 14px 35px; background: linear-gradient(to right, #ff8a00, #da1b60); color: white; border: none; border-radius: 30px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 5px 15px rgba(218, 27, 96, 0.4); } .btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(218, 27, 96, 0.6); } .slider-controls { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 15px; z-index: 10; } .slider-dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.4); cursor: pointer; transition: all 0.3s ease; } .slider-dot.active { background: #ff8a00; transform: scale(1.3); } .nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.2); width: 50px; height: 50px; border-radius: 50%; display: flex; justify-content: center; align-items: center; cursor: pointer; z-index: 10; transition: all 0.3s ease; backdrop-filter: blur(5px); } .nav-btn:hover { background: rgba(255, 255, 255, 0.3); transform: translateY(-50%) scale(1.1); } .prev { left: 20px; } .next { right: 20px; } .nav-btn i { font-size: 1.5rem; color: white; } /* Responsive Design */ @media (max-width: 992px) { .slider { height: 500px; } .shoe-info h2 { font-size: 2.2rem; } .price { font-size: 1.8rem; } } @media (max-width: 768px) { .slide { flex-direction: column; text-align: center; padding: 20px; } .slider { height: auto; } .shoe-image { margin-bottom: 20px; } .shoe-image img { max-height: 300px; } .features { justify-content: center; } .slider-controls { bottom: 15px; } } @media (max-width: 576px) { .shoe-info h2 { font-size: 1.8rem; } .shoe-info p { font-size: 1rem; } .price { font-size: 1.5rem; } .features { flex-wrap: wrap; } .nav-btn { width: 40px; height: 40px; } }
JavaScript
document.addEventListener('DOMContentLoaded', function() { const slider = document.querySelector('.slider'); const slides = document.querySelectorAll('.slide'); const dots = document.querySelectorAll('.slider-dot'); const prevBtn = document.querySelector('.prev'); const nextBtn = document.querySelector('.next'); let currentSlide = 0; const slideCount = slides.length; // Function to go to a specific slide function goToSlide(n) { currentSlide = (n + slideCount) % slideCount; slider.style.transform = `translateX(-${currentSlide * 100}%)`; // Update active classes slides.forEach(slide => slide.classList.remove('active')); slides[currentSlide].classList.add('active'); dots.forEach(dot => dot.classList.remove('active')); dots[currentSlide].classList.add('active'); } // Next slide function function nextSlide() { goToSlide(currentSlide + 1); } // Previous slide function function prevSlide() { goToSlide(currentSlide - 1); } // Event listeners for navigation buttons nextBtn.addEventListener('click', nextSlide); prevBtn.addEventListener('click', prevSlide); // Event listeners for dots dots.forEach((dot, index) => { dot.addEventListener('click', () => { goToSlide(index); }); }); // Auto slide every 5 seconds let slideInterval = setInterval(nextSlide, 5000); // Pause auto-slide on hover slider.addEventListener('mouseenter', () => { clearInterval(slideInterval); }); // Resume auto-slide when not hovering slider.addEventListener('mouseleave', () => { slideInterval = setInterval(nextSlide, 5000); }); // Keyboard navigation document.addEventListener('keydown', (e) => { if (e.key === 'ArrowLeft') { prevSlide(); } else if (e.key === 'ArrowRight') { nextSlide(); } }); });
Output Preview
Desktop
Mobile
Fullscreen