MotionLift

Parallax scrolling today: how to use it without making people ill

By Pulse Labs · Published · Updated · 2 min read

Parallax scrolling is an effect where the background of a page moves at a different speed from the foreground as you scroll, which makes the page look as if it has layers. It still works as a way to add depth. It is also one of the effects most likely to make people with motion sensitivity feel unwell, so use it sparingly and give people a way out.

This guide gives a version that is safe by default: a small movement, applied to a decorative picture, which switches itself off for anyone who has asked their device for less motion. The demo is real and the code is below it.

Why it needs care

The W3C's explanation of success criterion 2.3.3 describes parallax as an animation that is often non-essential, and says non-essential motion tied to scrolling should be added responsibly and be possible to turn off. That criterion is Level AAA, the strictest tier, but the reasoning is why browsers expose a reduced motion setting at all. A List Apart interviewed people with vestibular conditions in Designing Safer Web Animation for Motion Sensitivity and found exaggerated parallax among the most likely triggers; motion that changes only opacity or colour is far less likely to be a problem.

Practical limits we use: one parallax element per page, small distance, never behind text, and never on content people must read.

A small, safe parallax in CSS

The picture drifts a short distance as the frame scrolls. It uses a view() timeline, so the browser does the work without JavaScript. It is wrapped in @supports and prefers-reduced-motion, so unsupported browsers and visitors who want less motion see a still picture.

Live demo Picture that drifts against the page
Markup · html
<p class="lead">Scroll the frame.</p>
<div class="frame"><div class="pic" role="img" aria-label="Decorative gradient"></div></div>
<p class="after">Text stays where it is. Only the picture drifts.</p>
Styles · css
.lead { margin: 0 0 30px; }
.frame { height: 200px; overflow: clip; border-radius: 16px; margin-bottom: 150px; }
.pic { height: 280px; margin-top: -40px; background: radial-gradient(circle at 30% 30%, #8a73f5, #241a44 60%), #241a44; }
.after { margin: 0 0 120px; }
@supports ((animation-timeline: view()) and (animation-range: 0% 100%)) {
  @media (prefers-reduced-motion: no-preference) {
    .pic { animation: drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    @keyframes drift { from { transform: translateY(-36px); } to { transform: translateY(36px); } }
  }
}

Do not use a fixed background for parallax

The older trick, background-attachment: fixed, is unreliable on phones. Elementor's help documentation, for example, says a fixed background does not work in Safari on iPhone and iPad and recommends its scroll effect instead. A transform-based effect like the one above avoids the problem.

Parallax on a platform you do not control

Most site builders offer a parallax option on backgrounds. Webflow documents one using a while-scrolling interaction, and Elementor's vertical scroll effect is its parallax. Use those if you need parallax on one section. If you want depth across a whole existing page without setting it per element, MotionLift's opening depth moves the headline and first picture in layers and its images turn gently as they cross the screen, and it skips anything holding a sticky or fixed element and respects reduced motion.

A short checklist

  • Decorative picture only, not text or controls.
  • Distance under a few dozen pixels.
  • @supports and prefers-reduced-motion both in place.
  • Looks fine as a still picture.
  • Test with the system reduced-motion setting on. The accessibility guide shows how.