Futuristic Scroller Template
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>Ultimate Futuristic Scroller</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet"> </head> <body> <div class="scroller-container"> <h2 class="scroller-title">Futuristic Vision</h2> <div class="scroller" id="imageScroller"> <div class="scroller-item"> <div class="scroller-border"></div> <span class="scroller-tech-tag">new</span> <img src="https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?q=80&w=944&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="Future City" class="scroller-image"> <div class="scroller-content"> <h3>Neon Metropolis</h3> <p>Explore the cyberpunk cityscape with towering skyscrapers and holographic advertisements lighting up the night.</p> <a href="#" class="scroller-btn">Enter <i class="fas fa-arrow-right"></i></a> </div> <div class="scroller-progress"></div> </div> <div class="scroller-item"> <div class="scroller-border"></div> <span class="scroller-tech-tag">Quantum</span> <img src="https://plus.unsplash.com/premium_photo-1683120966127-14162cdd0935?q=80&w=363&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="AI Technology" class="scroller-image"> <div class="scroller-content"> <h3>AI Revolution</h3> <p>Witness the next generation of artificial intelligence and quantum computing reshaping our world.</p> <a href="#" class="scroller-btn">Discover <i class="fas fa-arrow-right"></i></a> </div> <div class="scroller-progress"></div> </div> <div class="scroller-item"> <div class="scroller-border"></div> <span class="scroller-tech-tag">Virtual</span> <img src="https://images.unsplash.com/photo-1605647540924-852290f6b0d5?q=80&w=837&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="Virtual Reality" class="scroller-image"> <div class="scroller-content"> <h3>VR Universe</h3> <p>Immerse yourself in fully interactive virtual worlds with neural interface technology.</p> <a href="#" class="scroller-btn">Connect <i class="fas fa-arrow-right"></i></a> </div> <div class="scroller-progress"></div> </div> <div class="scroller-item"> <div class="scroller-border"></div> <span class="scroller-tech-tag">Biotech</span> <img src="https://images.unsplash.com/photo-1656331797721-b593b8f00297?q=80&w=580&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="Biotechnology" class="scroller-image"> <div class="scroller-content"> <h3>Genetic Evolution</h3> <p>The future of human enhancement through advanced biotechnology and gene editing.</p> <a href="#" class="scroller-btn">Evolve <i class="fas fa-arrow-right"></i></a> </div> <div class="scroller-progress"></div> </div> <div class="scroller-item"> <div class="scroller-border"></div> <span class="scroller-tech-tag">Space</span> <img src="https://plus.unsplash.com/premium_photo-1669839137069-4166d6ea11f4?q=80&w=774&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="Space Colonization" class="scroller-image"> <div class="scroller-content"> <h3>Interplanetary</h3> <p>Join the new era of space exploration and extraterrestrial colonization beyond Earth.</p> <a href="#" class="scroller-btn">Launch <i class="fas fa-arrow-right"></i></a> </div> <div class="scroller-progress"></div> </div> </div> <div class="scroller-nav"> <div class="nav-dot active" data-index="0"></div> <div class="nav-dot" data-index="1"></div> <div class="nav-dot" data-index="2"></div> <div class="nav-dot" data-index="3"></div> <div class="nav-dot" data-index="4"></div> </div> </div> </body> </html>
CSS
:root { --primary-blue: #2563eb; --secondary-blue: #3b82f6; --accent-blue: #93c5fd; --dark-blue: #1e3a8a; --light-blue: #dbeafe; --neon-blue: #00f5ff; --gradient-blue: linear-gradient(135deg, #2563eb 0%, #00f5ff 100%); --glow-blue: 0 0 15px rgba(0, 245, 255, 0.7); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Poppins', sans-serif; background: #0f172a; display: flex; justify-content: center; align-items: center; min-height: 100vh; color: white; overflow-x: hidden; } .scroller-container { width: 100%; max-width: 1400px; position: relative; padding: 60px 20px; } .scroller-title { text-align: center; margin-bottom: 50px; font-size: 2.8rem; font-weight: 700; letter-spacing: 1px; background: var(--gradient-blue); -webkit-background-clip: text; background-clip: text; color: white; /* text-shadow: var(--glow-blue); */ position: relative; } .scroller-title::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 100px; height: 3px; background: var(--gradient-blue); border-radius: 3px; } .scroller { display: flex; gap: 30px; padding: 30px 0; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; } .scroller::-webkit-scrollbar { display: none; } .scroller-item { scroll-snap-align: center; min-width: 80%; position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4); transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); aspect-ratio: 16/9; transform-style: preserve-3d; perspective: 1000px; } @media (min-width: 768px) { .scroller-item { min-width: 45%; } } @media (min-width: 1024px) { .scroller-item { min-width: 30%; } } .scroller-item:hover { transform: translateY(-15px) scale(1.03); box-shadow: 0 25px 50px rgba(0, 247, 255, 0.133); } .scroller-image { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease, filter 0.8s ease; filter: brightness(0.9); position: relative; z-index: 1; } .scroller-item:hover .scroller-image { transform: scale(1.1); filter: brightness(1.1) contrast(1.1); } .scroller-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 30px; z-index: 2; background: linear-gradient(to top, rgba(30, 58, 138, 0.9), transparent); transform: translateY(100%); opacity: 0; transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1); backdrop-filter: blur(8px); } .scroller-item:hover .scroller-content { transform: translateY(0); opacity: 1; } .scroller-content h3 { font-size: 1.8rem; margin-bottom: 10px; font-weight: 600; letter-spacing: 0.5px; } .scroller-content p { font-size: 1rem; margin-bottom: 20px; line-height: 1.6; opacity: 0.9; transform: translateY(10px); transition: transform 0.5s ease, opacity 0.5s ease; transition-delay: 0.1s; } .scroller-item:hover .scroller-content p { transform: translateY(0); } .scroller-btn { display: inline-flex; align-items: center; padding: 10px 25px; background-color: var(--neon-blue); color: var(--dark-blue); border: none; border-radius: 50px; font-weight: 600; text-decoration: none; font-size: 0.9rem; transition: all 0.3s ease; box-shadow: var(--glow-blue); transform: translateY(10px); opacity: 0; transition: all 0.5s ease; } .scroller-item:hover .scroller-btn { transform: translateY(0); opacity: 1; transition-delay: 0.2s; } .scroller-btn:hover { background-color: white; transform: translateY(-3px) scale(1.05); box-shadow: 0 0 25px rgba(0, 245, 255, 0.8); } .scroller-btn i { margin-left: 8px; transition: transform 0.3s ease; } .scroller-btn:hover i { transform: translateX(5px); } .scroller-nav { display: flex; justify-content: center; gap: 15px; margin-top: 40px; } .nav-dot { width: 14px; height: 14px; border-radius: 50%; background-color: rgba(59, 130, 246, 0.3); cursor: pointer; transition: all 0.4s ease; position: relative; overflow: hidden; } .nav-dot::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--gradient-blue); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease; } .nav-dot.active::after { transform: scaleX(1); } .nav-dot.active { transform: scale(1.4); box-shadow: var(--glow-blue); } .scroller-tech-tag { position: absolute; top: 20px; right: 20px; background: rgba(0, 245, 255, 0.2); backdrop-filter: blur(5px); padding: 6px 18px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: white; z-index: 3; transform: translateY(-20px); opacity: 0; transition: all 0.6s ease; } .scroller-item:hover .scroller-tech-tag { transform: translateY(0); opacity: 1; } .scroller-border { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border: 2px solid rgba(59, 130, 246, 0.3); border-radius: 20px; z-index: 2; pointer-events: none; animation: borderPulse 4s infinite; } @keyframes borderPulse { 0%, 100% { border-color: rgba(59, 130, 246, 0.3); box-shadow: 0 0 10px rgba(59, 130, 246, 0.3); } 50% { border-color: var(--neon-blue); box-shadow: 0 0 20px var(--neon-blue); } } .scroller-item:hover .scroller-border { animation: borderPulseFast 1.5s infinite; } @keyframes borderPulseFast { 0%, 100% { border-color: rgba(59, 130, 246, 0.5); box-shadow: 0 0 15px rgba(59, 130, 246, 0.5); } 50% { border-color: var(--neon-blue); box-shadow: 0 0 30px var(--neon-blue); } } .scroller-progress { position: absolute; bottom: 0; left: 0; height: 4px; background: var(--gradient-blue); width: 0%; transition: width 0.1s linear; z-index: 10; } /* Glitch effect on hover */ .scroller-item:hover .scroller-image { animation: glitch-effect 1.5s infinite alternate; } @keyframes glitch-effect { 0% { filter: brightness(1.1) contrast(1.1); transform: scale(1.1) translateX(0); } 25% { transform: scale(1.1) translateX(-2px); } 50% { transform: scale(1.1) translateX(2px); } 75% { transform: scale(1.1) translateY(-2px); } 100% { transform: scale(1.1) translateY(2px); } } /* Responsive adjustments */ @media (max-width: 768px) { .scroller-title { font-size: 2.2rem; margin-bottom: 30px; } .scroller-item { min-width: 85%; } .scroller-content { padding: 20px; } .scroller-content h3 { font-size: 1.5rem; } } @media (max-width: 480px) { .scroller-title { font-size: 1.8rem; } .scroller-item { min-width: 90%; aspect-ratio: 4/5; } .scroller-content h3 { font-size: 1.3rem; } .scroller-btn { padding: 8px 20px; font-size: 0.8rem; } }
JavaScript
document.addEventListener('DOMContentLoaded', function() { const scroller = document.getElementById('imageScroller'); const dots = document.querySelectorAll('.nav-dot'); const items = document.querySelectorAll('.scroller-item'); let isDragging = false; let startX; let scrollLeft; let currentIndex = 0; let autoScrollInterval; let isAutoScrolling = false; // Initialize scroll position scroller.scrollLeft = 0; // Mouse drag functionality scroller.addEventListener('mousedown', (e) => { isDragging = true; startX = e.pageX - scroller.offsetLeft; scrollLeft = scroller.scrollLeft; scroller.style.cursor = 'grabbing'; scroller.style.scrollBehavior = 'auto'; pauseAutoScroll(); }); scroller.addEventListener('mousemove', (e) => { if (!isDragging) return; e.preventDefault(); const x = e.pageX - scroller.offsetLeft; const walk = (x - startX) * 2; scroller.scrollLeft = scrollLeft - walk; updateActiveDot(); }); scroller.addEventListener('mouseup', () => { isDragging = false; scroller.style.cursor = 'grab'; scroller.style.scrollBehavior = 'smooth'; resumeAutoScroll(); }); scroller.addEventListener('mouseleave', () => { isDragging = false; scroller.style.cursor = 'grab'; }); // Touch support scroller.addEventListener('touchstart', (e) => { isDragging = true; startX = e.touches[0].pageX - scroller.offsetLeft; scrollLeft = scroller.scrollLeft; scroller.style.scrollBehavior = 'auto'; pauseAutoScroll(); }, { passive: false }); scroller.addEventListener('touchmove', (e) => { if (!isDragging) return; e.preventDefault(); const x = e.touches[0].pageX - scroller.offsetLeft; const walk = (x - startX) * 2; scroller.scrollLeft = scrollLeft - walk; updateActiveDot(); }, { passive: false }); scroller.addEventListener('touchend', () => { isDragging = false; scroller.style.scrollBehavior = 'smooth'; resumeAutoScroll(); }); // Dot navigation dots.forEach(dot => { dot.addEventListener('click', () => { const index = parseInt(dot.getAttribute('data-index')); scrollToIndex(index); }); }); // Auto-scroll functionality function startAutoScroll() { clearInterval(autoScrollInterval); isAutoScrolling = true; autoScrollInterval = setInterval(() => { currentIndex = (currentIndex + 1) % items.length; scrollToIndex(currentIndex); }, 5000); } function pauseAutoScroll() { clearInterval(autoScrollInterval); isAutoScrolling = false; } function resumeAutoScroll() { if (!isAutoScrolling) { startAutoScroll(); } } function scrollToIndex(index) { currentIndex = index; const item = items[index]; const containerWidth = scroller.offsetWidth; const itemLeft = item.offsetLeft; const itemWidth = item.offsetWidth; const scrollPosition = itemLeft - (containerWidth / 2) + (itemWidth / 2); scroller.scrollTo({ left: scrollPosition, behavior: 'smooth' }); updateActiveDot(); } function updateActiveDot() { const scrollPosition = scroller.scrollLeft + (scroller.offsetWidth / 2); items.forEach((item, index) => { const itemStart = item.offsetLeft; const itemEnd = itemStart + item.offsetWidth; if (scrollPosition >= itemStart && scrollPosition < itemEnd) { currentIndex = index; dots.forEach(dot => dot.classList.remove('active')); dots[index].classList.add('active'); } }); } // Initialize scroller.addEventListener('scroll', updateActiveDot); startAutoScroll(); // Pause auto-scroll on hover scroller.addEventListener('mouseenter', pauseAutoScroll); scroller.addEventListener('mouseleave', resumeAutoScroll); // 3D tilt effect items.forEach(item => { item.addEventListener('mousemove', (e) => { if (window.innerWidth > 768) { const rect = item.getBoundingClientRect(); const x = e.clientX - rect.left; const y = e.clientY - rect.top; const centerX = rect.width / 2; const centerY = rect.height / 2; const angleX = (y - centerY) / 20; const angleY = (centerX - x) / 20; item.style.transform = `translateY(-15px) scale(1.03) rotateX(${angleX}deg) rotateY(${angleY}deg)`; } }); item.addEventListener('mouseleave', () => { item.style.transform = 'translateY(-15px) scale(1.03)'; }); }); });
Output Preview
Desktop
Mobile
Fullscreen