Parallax scrolling
Parallax scrolling is a web design technique in which the background of a page moves more slowly than the foreground while the visitor scrolls. The difference in speed creates an illusion of depth, similar to what you see from a moving car when distant hills seem to move slower than nearby trees.
It matters because used with restraint, it adds rhythm and a sense of space to a page, especially in a hero section or a storytelling layout. Used badly, it slows the page down and makes some visitors feel unwell.
How parallax scrolling works
The browser moves one or more layers by a fraction of the scroll distance. Modern implementations rely on CSS transforms, which the browser can handle on the graphics processor, or on scroll-linked animations. A simple version looks like this:
background-attachment: fixedkeeps a background image still while content scrolls over it.transform: translateY()driven by the scroll position moves a layer at a custom speed.- Scroll-driven animations in CSS or a small script link the movement directly to the scroll progress.
Types of parallax effects
- Background parallax: a single image moves slower behind the content.
- Multi-layer parallax: several layers move at different speeds for a stronger depth effect.
- Horizontal parallax: layers move sideways while the visitor scrolls down.
- Element parallax: individual items, such as an image or a shape, drift slightly against the text.
Parallax vs fixed background vs scroll reveal
| Aspect | Parallax | Fixed background | Scroll reveal |
|---|---|---|---|
| Movement | Layers move at different speeds | Background stays still | Elements appear as they enter the screen |
| Depth effect | Strong | Light | None |
| Performance cost | Medium to high | Low | Low |
Best practices and risks
- Respect reduced motion: turn the effect off when the visitor sets
prefers-reduced-motion, as strong movement can cause dizziness. - Protect performance: animate only transforms, compress images and watch Core Web Vitals, since heavy scroll effects can hurt loading and responsiveness.
- Check mobile: many mobile browsers handle fixed backgrounds poorly, so test on real devices.
- Keep content readable: text must stay legible and accessible while layers move.
- Use it sparingly: one or two well-placed effects work better than movement everywhere.
Parallax scrolling at BeBranded
We use motion to support the message, not to decorate it, and we test every effect for speed and accessibility before it ships. Parallax decisions are part of our design service, from the first layout to the final build.