Parallax scrolling

Also called parallax effect

A scroll effect where background layers move slower than the foreground, which creates a sense of depth as the page scrolls.

What is Parallax scrolling?

Parallax scrolling borrows a trick from side-scrolling games: things far away move slowly and things up close move fast. On a web page, a hero illustration might scroll at a fraction of normal speed while the headline and content scroll normally, so the scene feels layered.

It works best in a hero or one illustrated section where depth adds to the story. Use two to four layers with clearly different speeds, and keep text on a layer that moves at normal speed so it stays easy to read.

Strong or constant parallax can make some people feel motion sick, so turn it off when prefers-reduced-motion is set. Move layers with transform; the older background-attachment: fixed trick is ignored by many mobile browsers.

All terms

Scroll-driven animation

An animation whose progress is tied directly to the scroll position, so it moves forward as you scroll down and rewinds as you scroll up.

Hero section

The large first section at the top of a landing page, with a headline, a short subhead, a call to action, and a visual.

Perspective

A CSS property that sets how far the viewer sits from a 3D scene, so rotated elements look deep up close and flatter from far away.

Reduced motion

An operating system setting that asks apps to minimize movement, which websites detect with the prefers-reduced-motion media query.