Futuristic Showcase
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>Futuristic Yellow Carousel</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> </head> <body> <div class="carousel-container"> <h1 class="carousel-title">Futuristic Showcase</h1> <div class="carousel"> <div class="holographic-effect"></div> <div class="particles" id="particles-1"></div> <div class="particles" id="particles-2"></div> <div class="carousel-inner"> <!-- Item 1 --> <div class="carousel-item" style="background-image: url('https://source.unsplash.com/random/1200x600/?future,tech')"> <div class="carousel-content"> <h2>Innovation Unleashed</h2> <p>Experience the cutting edge of technology with our revolutionary solutions designed to transform your digital landscape.</p> <button class="carousel-btn">Explore More</button> </div> </div> <!-- Item 2 --> <div class="carousel-item" style="background-image: url('https://source.unsplash.com/random/1200x600/?cyber,digital')"> <div class="carousel-content"> <h2>Digital Transformation</h2> <p>Step into the future with our seamless integration of AI and machine learning for unparalleled business performance.</p> <button class="carousel-btn">Discover Now</button> </div> </div> <!-- Item 3 --> <div class="carousel-item" style="background-image: url('https://source.unsplash.com/random/1200x600/?neon,yellow')"> <div class="carousel-content"> <h2>Golden Era of Tech</h2> <p>Witness the convergence of design and technology in our premium yellow-themed futuristic interfaces.</p> <button class="carousel-btn">Join the Future</button> </div> </div> </div> <button class="carousel-control prev"> <i class="fas fa-chevron-left"></i> </button> <button class="carousel-control next"> <i class="fas fa-chevron-right"></i> </button> <div class="carousel-indicators"> <div class="indicator active"></div> <div class="indicator"></div> <div class="indicator"></div> </div> </div> </div> </body> </html>
CSS
:root { --primary-color: #FFD700; --secondary-color: #FFA500; --dark-accent: #333; --light-accent: #FFF8E1; --glow-effect: 0 0 15px rgba(255, 215, 0, 0.7); --futuristic-font: 'Orbitron', sans-serif; } @import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap'); * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: var(--futuristic-font); background-color: var(--dark-accent); color: var(--light-accent); overflow-x: hidden; } .carousel-container { max-width: 1200px; margin: 5vh auto; position: relative; perspective: 1000px; } .carousel-title { text-align: center; margin-bottom: 30px; font-size: 2.5rem; text-transform: uppercase; letter-spacing: 3px; color: var(--primary-color); text-shadow: var(--glow-effect); position: relative; } .carousel-title::after { content: ''; display: block; width: 100px; height: 3px; background: linear-gradient(90deg, transparent, var(--primary-color), transparent); margin: 15px auto; } .carousel { display: flex; overflow: hidden; position: relative; height: 400px; border-radius: 15px; box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3); background: linear-gradient(135deg, rgba(51, 51, 51, 0.8), rgba(30, 30, 30, 0.9)); border: 1px solid var(--primary-color); } .carousel-inner { display: flex; transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); height: 100%; width: 100%; } .carousel-item { min-width: 100%; height: 100%; position: relative; display: flex; align-items: center; justify-content: center; padding: 40px; background-size: cover; background-position: center; overflow: hidden; } .carousel-item::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(45deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%); z-index: 1; } .carousel-content { position: relative; z-index: 2; text-align: center; max-width: 800px; padding: 30px; background: rgba(51, 51, 51, 0.7); border-radius: 10px; border: 1px solid var(--primary-color); box-shadow: var(--glow-effect); transform-style: preserve-3d; transition: all 0.5s ease; } .carousel-content:hover { transform: translateZ(20px) scale(1.02); box-shadow: 0 0 25px var(--primary-color); } .carousel-item h2 { font-size: 2.2rem; margin-bottom: 15px; color: var(--primary-color); text-shadow: 0 0 10px rgba(255, 215, 0, 0.5); } .carousel-item p { font-size: 1.1rem; line-height: 1.6; margin-bottom: 20px; } .carousel-btn { display: inline-block; padding: 12px 30px; background: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); border-radius: 30px; font-family: var(--futuristic-font); font-weight: bold; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; } .carousel-btn:hover { background: var(--primary-color); color: var(--dark-accent); box-shadow: var(--glow-effect); transform: translateY(-3px); } .carousel-btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.4), transparent); transition: 0.5s; } .carousel-btn:hover::before { left: 100%; } .carousel-control { position: absolute; top: 50%; transform: translateY(-50%); width: 60px; height: 60px; background: rgba(51, 51, 51, 0.7); border: 2px solid var(--primary-color); border-radius: 50%; color: var(--primary-color); font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; transition: all 0.3s ease; box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); } .carousel-control:hover { background: var(--primary-color); color: var(--dark-accent); box-shadow: var(--glow-effect); transform: translateY(-50%) scale(1.1); } .carousel-control.prev { left: 20px; } .carousel-control.next { right: 20px; } .carousel-indicators { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; } .indicator { width: 12px; height: 12px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); border: 1px solid var(--primary-color); cursor: pointer; transition: all 0.3s ease; } .indicator.active { background: var(--primary-color); box-shadow: var(--glow-effect); transform: scale(1.3); } /* Futuristic effects */ .holographic-effect { position: absolute; width: 100%; height: 100%; top: 0; left: 0; background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0) 20%, rgba(255, 215, 0, 0.1) 40%, rgba(255, 215, 0, 0) 60%, rgba(255, 215, 0, 0.1) 80%, rgba(255, 215, 0, 0) 100%); pointer-events: none; animation: holographic 8s infinite linear; z-index: 1; } @keyframes holographic { 0% { transform: translateY(0) translateX(0); } 25% { transform: translateY(-20px) translateX(20px); } 50% { transform: translateY(0) translateX(40px); } 75% { transform: translateY(20px) translateX(20px); } 100% { transform: translateY(0) translateX(0); } } .particles { position: absolute; width: 100%; height: 100%; top: 0; left: 0; overflow: hidden; z-index: 0; } .particle { position: absolute; width: 2px; height: 2px; background: var(--primary-color); border-radius: 50%; opacity: 0.5; animation: float 15s infinite linear; } @keyframes float { 0% { transform: translateY(0) translateX(0); opacity: 0; } 10% { opacity: 0.5; } 90% { opacity: 0.5; } 100% { transform: translateY(-500px) translateX(100px); opacity: 0; } } /* Responsive design */ @media (max-width: 992px) { .carousel { height: 350px; } .carousel-item h2 { font-size: 1.8rem; } .carousel-content { padding: 20px; } } @media (max-width: 768px) { .carousel { height: 300px; } .carousel-title { font-size: 2rem; } .carousel-item h2 { font-size: 1.5rem; } .carousel-item p { font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; } .carousel-btn { padding: 10px 20px; font-size: 0.9rem; } .carousel-control { width: 50px; height: 50px; font-size: 1.2rem; } } @media (max-width: 576px) { .carousel { height: 250px; } .carousel-title { font-size: 1.5rem; } .carousel-content { padding: 15px; } .carousel-item h2 { font-size: 1.2rem; margin-bottom: 10px; } .carousel-item p { -webkit-line-clamp: 2; margin-bottom: 10px; } .carousel-control { width: 40px; height: 40px; font-size: 1rem; } .indicator { width: 8px; height: 8px; } }
JavaScript
document.addEventListener('DOMContentLoaded', function() { const carouselInner = document.querySelector('.carousel-inner'); const carouselItems = document.querySelectorAll('.carousel-item'); const prevBtn = document.querySelector('.prev'); const nextBtn = document.querySelector('.next'); const indicators = document.querySelectorAll('.indicator'); let currentIndex = 0; const itemCount = carouselItems.length; // Create particles function createParticles(containerId, count) { const container = document.getElementById(containerId); for (let i = 0; i < count; i++) { const particle = document.createElement('div'); particle.classList.add('particle'); particle.style.left = `${Math.random() * 100}%`; particle.style.top = `${Math.random() * 100}%`; particle.style.width = `${Math.random() * 3 + 1}px`; particle.style.height = particle.style.width; particle.style.animationDelay = `${Math.random() * 15}s`; particle.style.animationDuration = `${Math.random() * 10 + 10}s`; container.appendChild(particle); } } createParticles('particles-1', 30); createParticles('particles-2', 20); // Update carousel position function updateCarousel() { carouselInner.style.transform = `translateX(-${currentIndex * 100}%)`; // Update indicators indicators.forEach((indicator, index) => { if (index === currentIndex) { indicator.classList.add('active'); } else { indicator.classList.remove('active'); } }); } // Next slide function nextSlide() { currentIndex = (currentIndex + 1) % itemCount; updateCarousel(); } // Previous slide function prevSlide() { currentIndex = (currentIndex - 1 + itemCount) % itemCount; updateCarousel(); } // Event listeners nextBtn.addEventListener('click', nextSlide); prevBtn.addEventListener('click', prevSlide); // Indicator click indicators.forEach((indicator, index) => { indicator.addEventListener('click', () => { currentIndex = index; updateCarousel(); }); }); // Auto-rotate let autoRotate = setInterval(nextSlide, 5000); // Pause on hover const carousel = document.querySelector('.carousel'); carousel.addEventListener('mouseenter', () => { clearInterval(autoRotate); }); carousel.addEventListener('mouseleave', () => { autoRotate = setInterval(nextSlide, 5000); }); // Touch events for mobile let touchStartX = 0; let touchEndX = 0; carousel.addEventListener('touchstart', (e) => { touchStartX = e.changedTouches[0].screenX; }, {passive: true}); carousel.addEventListener('touchend', (e) => { touchEndX = e.changedTouches[0].screenX; handleSwipe(); }, {passive: true}); function handleSwipe() { if (touchEndX < touchStartX - 50) { nextSlide(); } if (touchEndX > touchStartX + 50) { prevSlide(); } } });
Output Preview
Desktop
Mobile
Fullscreen