Skip to content
All terms
Motion/lexicon/parallax

What is parallax scrolling?

Parallax scrolling is an effect where background and foreground layers move at different speeds as you scroll, creating an illusion of depth.

Key CSSanimation-timeline: scroll()transform: translateY(...)will-change: transform
0.2x
0.5x
1x
scroll ↓
01 · Definition

Look out of a train window. The fence posts by the track blur past, the trees behind them drift, and the mountains on the horizon barely seem to move at all. Your brain reads that difference in speed as distance. Parallax scrolling borrows the trick and applies it to a flat web page.

The idea is much older than the web. Side-scrolling video games of the early 1980s used layered backgrounds moving at different rates to fake depth, and animators have used multiplane techniques for far longer. On the web, parallax caught fire in the early 2010s, when long single-page sites with dramatic layered scenes became a fashion statement. Some were gorgeous. Many were slow, jittery and nauseating, and the style earned a bad reputation.

The mechanics are simple. As the user scrolls, you translate one layer by a fraction of the scroll distance, maybe 0.8 times, while another moves at 1.0 or faster. The distant layer lags, the near layer keeps pace, and depth appears. You can do it with scroll listeners, with transforms driven by requestAnimationFrame, or with the newer CSS scroll-driven animations, which run off the main thread and are far smoother. The classic shortcut, background-attachment: fixed, is a trap: it behaves inconsistently and performs badly on many mobile browsers.

Where does parallax earn its place?

  • A hero photograph that drifts slowly behind a headline
  • Editorial features that want a cinematic opening
  • Product storytelling pages where a few layers create a sense of scale

Why does it work in those cases? Motion is the strongest attention signal our eyes have, and depth cues make flat imagery feel physical. A subtle offset, perhaps 5 to 15 percent of the scroll speed on a single hero image, adds richness without anyone noticing the mechanism.

Where does it fail? Everywhere you overdo it. Parallax can make text hard to read because moving backgrounds change contrast behind letters. It can break scroll expectations, since users feel the page fighting them. It costs battery and frames on weaker phones. And for people with vestibular disorders, large parallax movement can trigger dizziness or nausea. That last point is not a niche concern, it is a reason to build the fallback first.

So build it defensively. Wrap the effect in a prefers-reduced-motion check and turn it off completely for users who ask. Animate transforms and opacity only, never top or margin, so the browser can use the GPU. Keep the speed difference small, under about 0.5. Never apply parallax to body text or interactive elements, because a button that drifts while you try to click it is simply broken. Test on a mid-range Android phone, not only on your own laptop, and watch the frame rate while you scroll quickly, because that is when weak implementations fall apart.

Also ask yourself honestly whether you need it. A good test is to switch the effect off and see whether the page loses anything a visitor would miss. A scroll reveal or a sticky section often gives a similar sense of craft with less risk.

If you prompt an AI to build it, ask for a single hero layer with a gentle translate based on scroll progress, capped at a small range, using transform only, disabled for reduced motion, and static on touch devices if performance is a worry.

Use when
  • Hero sections with photographic backdrops
  • Editorial features with cinematic ambitions
Avoid when
  • Long pages where users want to scroll fast
  • Mobile by default, battery and performance hit
02 · Do
  • +Always wrap parallax in @media (prefers-reduced-motion: no-preference)
  • +Keep parallax speed delta below 0.5
03 · Don't
  • −Don't parallax body text or interactive elements
06 · Common questions

Parallax Scroll: your questions, answered

What is parallax scrolling?

It is an effect where layers of a page move at different speeds during scroll, so distant elements lag behind nearer ones. This creates an illusion of depth on a flat surface and is most often used on hero images.

Is parallax still considered modern?

Heavy full-page parallax feels dated, a relic of early-2010s sites. A restrained version, such as a small offset on one hero image, still reads as a polished depth cue and appears on many current editorial pages.

Does parallax hurt accessibility?

It can. Large movements may trigger dizziness or nausea for people with vestibular disorders. Respect the prefers-reduced-motion setting, keep text static and make sure the whole page works perfectly with the effect switched off. Test it with the setting on.

How do I implement parallax without hurting performance?

Animate only transforms, driven by scroll progress or by CSS scroll-driven animations. Avoid background-attachment: fixed, which performs poorly on mobile, and test on a mid-range phone rather than only on a fast laptop with a good GPU.

Does parallax affect SEO?

Not directly, but heavy scripts and layout shifts can slow the page and hurt Core Web Vitals. Keep content in real HTML, avoid hiding text behind scroll triggers and measure performance after adding the effect.

People also ask

More quick answers

What is the difference between parallax and scroll reveal?

Parallax continuously moves layers at different speeds while you scroll. Scroll reveal triggers an element to fade or slide in once as it enters the viewport, then it stays put.

Should I use parallax on mobile?

Usually not by default. Small screens, battery use and touch scrolling make it riskier. If you include it, keep it minimal and test on real devices.

What is a safe parallax speed?

Keep the speed difference small, under about 0.5 of scroll speed, or a 5 to 15 percent offset on a single image. Faster movement increases motion discomfort.

Is there a CSS-only way to do parallax?

Yes. Scroll-driven animations let you tie a transform to scroll progress in CSS, and an older perspective-based technique also exists. Check browser support before relying on either.

What can I use instead of parallax?

A sticky section that holds an image in place while text scrolls past gives depth and storytelling with far less motion, and it is easier on slow phones.

07 · Related terms
Free and open source

Found this useful? A GitHub star helps other designers find it.

Star on GitHub