<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Trailblazer Labs - Interactive Parallax Landing Page</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Arial', sans-serif;
color: #fff;
overflow-x: hidden;
line-height: 1.6;
}
/* Parallax Hero Section */
.parallax-hero {
height: 100vh;
overflow: hidden;
position: relative;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
.parallax-layer {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
will-change: transform;
}
.layer-stars {
background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
background-size: 50px 50px;
animation: twinkle 20s infinite linear;
}
.layer-galaxy {
background: linear-gradient(135deg, #0c0c0c 0%, #1a0033 50%, #000 100%);
opacity: 0.8;
}
.layer-mountains {
background:
radial-gradient(ellipse at 20% 80%, #4a4a4a 0%, transparent 50%),
radial-gradient(ellipse at 80% 20%, #666 0%, transparent 50%),
linear-gradient(to bottom, #2a2a2a 0%, #111 100%);
}
.layer-foreground {
background:
linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.9) 100%);
}
.hero-content {
position: relative;
z-index: 10;
max-width: 800px;
padding: 0 20px;
transform: translateY(50px);
opacity: 0;
transition: all 0.8s ease-out;
}
.hero-content.animate {
transform: translateY(0);
opacity: 1;
}
.hero-content h1 {
font-size: clamp(3rem, 8vw, 6rem);
margin-bottom: 1rem;
text-shadow: 0 0 20px rgba(255,255,255,0.5);
}
.hero-content p {
font-size: 1.5rem;
margin-bottom: 2rem;
text-shadow: 0 0 10px rgba(255,255,255,0.3);
}
.cta-button {
display: inline-block;
padding: 1rem 2rem;
background: linear-gradient(45deg, #ff6b6b, #ffd93d);
color: #000;
text-decoration: none;
font-weight: bold;
border-radius: 50px;
font-size: 1.2rem;
box-shadow: 0 10px 30px rgba(255,107,107,0.4);
transition: all 0.3s ease;
}
.cta-button:hover {
transform: translateY(-5px);
box-shadow: 0 15px 40px rgba(255,107,107,0.6);
}
/* Navigation */
nav {
position: fixed;
top: 0;
width: 100%;
background: rgba(0,0,0,0.8);
backdrop-filter: blur(10px);
z-index: 100;
padding: 1rem 0;
transition: all 0.3s ease;
}
nav ul {
list-style: none;
display: flex;
justify-content: center;
}
nav li {
margin: 0 1rem;
}
nav a {
color: #fff;
text-decoration: none;
font-weight: bold;
transition: color 0.3s;
}
nav a:hover {
color: #ffd93d;
}
/* Content Sections */
section {
padding: 100px 20px;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
position: relative;
}
#features {
background: linear-gradient(135deg, #0f0f23 0%, #1a1a3a 100%);
}
#about {
background: linear-gradient(135deg, #1a1a3a 0%, #0f0f23 100%);
}
#cta {
background: linear-gradient(135deg, #000 0%, #1a0033 100%);
}
h2 {
font-size: 3rem;
margin-bottom: 2rem;
text-shadow: 0 0 20px rgba(255,255,255,0.5);
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
max-width: 1200px;
width: 100%;
}
.feature {
background: rgba(255,255,255,0.1);
padding: 2rem;
border-radius: 20px;
backdrop-filter: blur(10px);
transition: transform 0.3s ease;
opacity: 0;
transform: translateY(50px);
}
.feature.animate {
opacity: 1;
transform: translateY(0);
}
.feature:hover {
transform: translateY(-10px);
}
/* Animations */
@keyframes twinkle {
0%, 100% { opacity: 0.3; }
50% { opacity: 1; }
}
/* Responsive */
@media (max-width: 768px) {
.hero-content h1 { font-size: 2.5rem; }
.hero-content p { font-size: 1.2rem; }
nav ul { flex-direction: column; }
}
/* Smooth Scroll */
html {
scroll-behavior: smooth;
}
</style>
</head>
<body>
<nav>
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#about">About</a></li>
<li><a href="#cta">Get Started</a></li>
</ul>
</nav>
<!-- Parallax Hero -->
<section id="home" class="parallax-hero">
<div class="parallax-layer layer-stars"></div>
<div class="parallax-layer layer-galaxy"></div>
<div class="parallax-layer layer-mountains"></div>
<div class="parallax-layer layer-foreground"></div>
<div class="hero-content">
<h1>Trailblazer Labs</h1>
<p>Explore the future with immersive parallax experiences built with vanilla CSS & JS.</p>
<a href="#features" class="cta-button">Discover More</a>
</div>
</section>
<!-- Features Section -->
<section id="features">
<h2>Interactive Features</h2>
<div class="features-grid">
<div class="feature">
<h3>🌌 Multi-Layer Parallax</h3>
<p>Scroll-driven parallax effects with multiple layers moving at different speeds for depth.</p>
</div>
<div class="feature">
<h3>✨ Mouse Interactivity</h3>
<p>Hover and scroll interactions with smooth animations and transforms.</p>
</div>
<div class="feature">
<h3>🚀 Vanilla Power</h3>
<p>No frameworks needed – pure CSS and JavaScript for blazing performance.</p>
</div>
</div>
</section>
<!-- About Section -->
<section id="about">
<h2>About Us</h2>
<p style="max-width: 800px; font-size: 1.3rem;">
Trailblazer Labs pioneers cutting-edge web experiences. This landing page showcases advanced parallax scrolling,
scroll-triggered animations, and interactive elements – all with vanilla technologies for ultimate control and speed.
</p>
</section>
<!-- CTA Section -->
<section id="cta">
<h2>Ready to Launch?</h2>
<p>Join the future of web design.</p>
<a href="#" class="cta-button" style="margin-top: 2rem;">Start Your Project</a>
</section>
<script>
// Parallax Scroll Effect
const layers = document.querySelectorAll('.parallax-layer');
const heroContent = document.querySelector('.hero-content');
function updateParallax() {
const scrolled = window.pageYOffset;
const rate1 = 0.3; // Slowest (stars)
const rate2 = 0.5; // Galaxy
const rate3 = 0.8; // Mountains
const rate4 = 1.2; // Foreground
layers[0].style.transform = `translateY(${scrolled * rate1}px)`;
layers[1].style.transform = `translateY(${scrolled * rate2}px)`;
layers[2].style.transform = `translateY(${scrolled * rate3}px)`;
layers[3].style.transform = `translateY(${scrolled * rate4}px)`;
}
window.addEventListener('scroll', updateParallax);
// Intersection Observer for Animations
const observerOptions = {
threshold: 0.1,
rootMargin: '0px 0px -50px 0px'
};
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('animate');
}
});
}, observerOptions);
// Observe hero content and features
observer.observe(heroContent);
document.querySelectorAll('.feature').forEach(el => observer.observe(el));
// Navbar scroll effect
window.addEventListener('scroll', () => {
const nav = document.querySelector('nav');
if (window.scrollY > 100) {
nav.style.background = 'rgba(0,0,0,0.95)';
nav.style.padding = '0.5rem 0';
} else {
nav.style.background = 'rgba(0,0,0,0.8)';
nav.style.padding = '1rem 0';
}
});
// Smooth mouse parallax tilt on hero (interactive bonus)
document.querySelector('.parallax-hero').addEventListener('mousemove', (e) => {
const { clientX, clientY } = e;
const x = (clientX / window.innerWidth) * 20 - 10;
const y = (clientY / window.innerHeight) * 20 - 10;
layers.forEach((layer, i) => {
const speed = 0.5 + (i * 0.2); // Different speeds per layer
layer.style.transform += ` translate(${x * speed}px, ${y * speed}px)`;
});
});
document.querySelector('.parallax-hero').addEventListener('mouseleave', () => {
layers.forEach(layer => {
layer.style.transform = layer.style.transform.replace(/translate\([^)]+\)/g, '');
});
});
// Init parallax on load
updateParallax();
</script>
</body>
</html>
This is a fully self-contained, responsive interactive landing page. Key Features:
- Multi-layer Parallax on Scroll: 4 layers (stars, galaxy, mountains, foreground) move at different speeds using
transform: translateY.
- Mouse Interactivity: Tilt parallax effect on hero section mousemove for extra immersion.
- Scroll-triggered Animations: Hero content and feature cards fade/slide in using
IntersectionObserver.
- Smooth Navbar: Blurs and shrinks on scroll.
- Responsive Design: Works on mobile/desktop with clamp/flex/grid.
- Vanilla Only: Pure HTML/CSS/JS – no libraries.
- Performance: Uses
will-change and efficient listeners.
Copy-paste into an HTML file and open in a browser. Scroll and move your mouse over the hero for the full effect! 🚀