Skip to content
UIGrammer
EN 中文

Animation · Scroll · 12

Parallax Background

Parallax Background = layers that move at different speeds as you scroll, adding depth without leaving the compositor.

Skip to the modify prompt

Respects prefers-reduced-motion: the animation is disabled and the final state is shown.

What is a Parallax Background?

Parallax fakes depth: a back layer drifts slowly while a front layer moves faster as you scroll, so the scene feels three-dimensional. Keep the speed gap small — too much parallax makes text hard to read and can trigger motion sickness. Native CSS scroll-driven animation keeps it free of scroll handlers.

Animation Specimen

Trigger
scroll
Tech
scroll-driven
Duration
3s
Easing
ease-in-out
Performance
transform

When to use

  • Hero backgrounds, product storytelling, landing pages
  • Any scene that benefits from a sense of depth

Avoid when

  • Text-heavy sections — parallax fights reading
  • Users prone to motion sickness (keep it minimal or off)

Small speed gap. Heavy parallax hurts readability and can cause nausea; offer a reduced-motion lock.

See also

Build a two-layer parallax: back drifts slowly, front faster, both transform-only and scroll-linked via animation-timeline: view().