Parallax scrolling
Parallax scrolling · Scroll a parallasse · Desplazamiento parallax · Parallax web · Scroll multilivello
As the page scrolls, the layers of an illustration or photo move at different speeds, with a slow background and a fast foreground. It boomed with the storytelling landing pages of the early 2010s and returns today in a more measured form through CSS scroll-driven animations.
- Era
- 2011 – today
- Origin
- Stati Uniti
- Use
- Mainstream
- Geography
- United States
Live demo
View code
<main class="root">
<div class="scene">
<svg class="l sun" viewBox="0 0 520 300"><circle cx="455" cy="70" r="28" fill="#FF9E5E"/><circle cx="455" cy="70" r="44" fill="#FF9E5E" opacity=".18"/></svg>
<div class="l title"><small>Itinerari lenti</small><h1>Pedala fino<br>al caffè</h1></div>
<svg class="l far" viewBox="0 0 520 300" preserveAspectRatio="none"><path d="M0 210 L70 140 L120 175 L190 98 L260 168 L320 120 L400 190 L460 130 L520 175 V300 H0Z" fill="#9BB3D1"/><path d="M190 98 L172 116 L184 112 L196 122 L206 112Z" fill="#fff" opacity=".7"/><path d="M460 130 L446 144 L458 141 L470 148Z" fill="#fff" opacity=".7"/></svg>
<svg class="l mid" viewBox="0 0 520 300" preserveAspectRatio="none"><path d="M0 230 C90 190 160 200 240 222 C330 246 410 190 520 214 V300 H0Z" fill="#5E8C7A"/></svg>
<svg class="l near" viewBox="0 0 520 300"><g fill="#2F5D50"><path d="M30 260 L48 200 L66 260Z"/><path d="M58 262 L80 186 L102 262Z"/><path d="M420 262 L440 196 L460 262Z"/><path d="M452 262 L470 212 L488 262Z"/><path d="M488 262 L506 204 L524 262Z"/></g><path d="M0 252 C120 244 380 244 520 254 V300 H0Z" fill="#3D6F5F"/></svg>
<div class="l front">
<svg viewBox="0 0 520 120" class="fg"><rect x="0" y="80" width="520" height="40" fill="#2B2A33"/><rect x="0" y="98" width="520" height="2" fill="#F7E3C4" opacity=".35" stroke-dasharray="14 10"/>
<g transform="translate(300 4)"><rect x="0" y="24" width="130" height="52" fill="#F7E3C4"/><rect x="0" y="24" width="130" height="52" fill="none" stroke="#2B2A33" stroke-width="2"/><path d="M-8 24 H138 L128 10 H2Z" fill="#E2553D"/><g fill="#fff"><rect x="6" y="24" width="12" height="8"/><rect x="30" y="24" width="12" height="8"/><rect x="54" y="24" width="12" height="8"/><rect x="78" y="24" width="12" height="8"/><rect x="102" y="24" width="12" height="8"/><rect x="126" y="24" width="8" height="8"/></g><rect x="12" y="42" width="30" height="34" fill="#2B2A33"/><rect x="58" y="40" width="60" height="24" fill="#FF9E5E" opacity=".85"/><text x="65" y="4" text-anchor="middle" font-family="Fraunces" font-weight="700" font-size="13" fill="#2B2A33">CAFFÈ</text><rect x="-24" y="66" width="18" height="10" fill="none" stroke="#2B2A33" stroke-width="2"/></g>
<g class="bike"><g transform="translate(110 38)"><g fill="none" stroke="#2B2A33" stroke-width="3"><circle class="w" cx="0" cy="28" r="14"/><circle class="w" cx="46" cy="28" r="14"/><path d="M0 28 L16 6 L38 6 L46 28 M16 6 L24 28 L38 6 M14 0 H22 M38 6 L36 -2 H44"/></g><path d="M14 -24 L26 2 L18 4 Z" fill="#E2553D"/><circle cx="12" cy="-30" r="7" fill="#F2C9A0"/><path d="M5 -32 C5 -44 21 -42 19 -30" fill="#2B2A33"/><path d="M18 -18 L38 -2" stroke="#E2553D" stroke-width="3"/><path d="M22 2 L30 14 L24 28" stroke="#2F5D50" stroke-width="4" fill="none"/></g></g>
</svg>
<div class="copy"><b>Il Caffè della Salita</b><span>Km 12 · aperto dalle 7:00 · rastrelliera per bici</span></div>
</div>
<div class="bar"><u></u></div>
</div>
</main> @property --s{syntax:'<number>';inherits:true;initial-value:0}
body{margin:0;height:100vh;display:grid;place-items:center;background:#EFE6D8;font-family:'DM Sans',sans-serif;overflow:hidden}
.root{width:520px}
.scene{position:relative;height:300px;border-radius:16px;overflow:hidden;background:linear-gradient(#F7E3C4,#FBEFDD 60%,#F7E3C4);box-shadow:0 24px 50px -24px #2B2A3366}
.l{position:absolute;left:0;width:100%;top:0;height:300px;transform:translateY(calc(var(--s) * var(--v) * -1px))}
.sun{--v:10}.far{--v:30}.mid{--v:60}.near{--v:95}
.title{--v:150;text-align:center;padding-top:40px;color:#2B2A33;opacity:calc(1 - var(--s) * 1)}
.title small{font-size:11px;letter-spacing:.2em;text-transform:uppercase;font-weight:600;color:#E2553D}
h1{font-family:Fraunces,serif;font-size:38px;line-height:1;margin:6px 0 0;letter-spacing:-.01em}
.front{--v:150;top:186px;height:auto}
.fg{display:block;width:100%;height:120px;margin-bottom:-1px}
.copy{background:#2B2A33;color:#F7E3C4;padding:2px 24px 220px;display:flex;flex-direction:column;gap:4px}
.copy b{font-family:Fraunces,serif;font-size:22px}.copy span{font-size:12px;opacity:.75}
.bar{position:absolute;z-index:3;right:6px;top:10px;bottom:10px;width:4px;border-radius:4px;background:#2B2A3322}
.bar u{display:block;height:38%;border-radius:4px;background:#2B2A3399;transform:translateY(calc(var(--s) * 160%))}
.scene{--s:.45}
@media (prefers-reduced-motion:no-preference){
.scene{animation:sc 7s cubic-bezier(.45,.05,.4,1) infinite}
.w{stroke-dasharray:8 3;animation:spin .6s linear infinite}
.bike{animation:ride 7s ease-in-out infinite}
@keyframes sc{0%,14%{--s:0}58%,70%{--s:1}100%{--s:0}}
@keyframes spin{to{stroke-dashoffset:-22}}
@keyframes ride{0%,100%{transform:translateX(-60px)}62%{transform:translateX(30px)}}
}
@media (max-width:580px){.root{zoom:.7}}
@media (max-width:395px){.root{zoom:.52}} Characteristics
- Separate layers with speeds proportional to distance
- Near-still background and racing foreground
- Headlines rising and fading over the scene
- Atmospheric perspective with lighter far planes
- Content sliding in from below like a stage flat
Palette
Click a swatch to copy it
Typography
Headings · Fraunces Parallax scrolling
Body · DM Sans As the page scrolls, the layers of an illustration or photo move at different speeds, with a slow background and a fast foreground. It boomed with the storytelling landing pages of the early 2010s and returns today in a more measured form through CSS scroll-driven animations.
Motion
- Easing
lineare legato allo scroll (o cubic-bezier(0.25, 0.1, 0.25, 1) con smoothing)- Typical duration
- legata alla posizione dello scroll; fattori di velocità 0,1–1,5 per livello
- Techniques
- CSS animation-timeline scroll(), GSAP ScrollTrigger, Rellax.js, transform translate3d per livello, perspective e translateZ, requestAnimationFrame
Accessibility (reduced motion)
All layers scroll with the page as a single image; only the layered composition remains, without differing speeds.
Prompt for your agent
Copy and paste into your prompt to have an agent or image generator reproduce this style.
For web pages and UI
Design the web page or interface in this style: Parallax scrolling (Scroll a parallasse). As the page scrolls, the layers of an illustration or photo move at different speeds, with a slow background and a fast foreground. It boomed with the storytelling landing pages of the early 2010s and returns today in a more measured form through CSS scroll-driven animations. Characteristics: Separate layers with speeds proportional to distance, Near-still background and racing foreground, Headlines rising and fading over the scene, Atmospheric perspective with lighter far planes, Content sliding in from below like a stage flat. Palette: #F7E3C4, #FF9E5E, #9BB3D1, #5E8C7A, #2F5D50, #2B2A33. Typography: headings in Fraunces, body text in DM Sans (Google Fonts or equivalents). Mood: immersive, dreamy, calm. Motion: easing lineare legato allo scroll (o cubic-bezier(0.25, 0.1, 0.25, 1) con smoothing), typical duration legata alla posizione dello scroll; fattori di velocità 0,1–1,5 per livello; techniques: CSS animation-timeline scroll(), GSAP ScrollTrigger, Rellax.js, transform translate3d per livello, perspective e translateZ, requestAnimationFrame. With prefers-reduced-motion: All layers scroll with the page as a single image; only the layered composition remains, without differing speeds. References: Nike «Better World» (2011), Rellax.js, GSAP ScrollTrigger, MDN «Scroll-driven animations».
Relations
Derives from
Similar to
Contrasts with
References
- Nike «Better World» (2011)
- Rellax.js
- GSAP ScrollTrigger
- MDN «Scroll-driven animations»