In short
- Parallax scrolling moves a background layer more slowly than the content in front of it, which gives a flat page a sense of depth.
- It works best as one restrained effect, usually on the hero image at the top of a page, not on every section.
- The modern way to build it is a CSS scroll-driven animation, which the browser runs in step with the scroll without any JavaScript.
- Phones are where parallax goes wrong: effects driven by scroll events lag behind the finger and the image stutters.
- Always switch the movement off for visitors who have asked their device to reduce motion.
Parallax scrolling is one of the few web design effects most people recognise without knowing its name. You scroll down a page, the text moves at the normal speed, and the photograph behind it moves a little more slowly, as if it were further away. Used once and gently, it makes a page feel considered. Used everywhere, it makes a page slow, distracting and, for some people, physically uncomfortable.
We use the effect on the hero image of our own home page, so this guide covers what we learned building it as well as the general rules: what parallax is, how to build it properly today, and when a still image is the better choice.
What Is Parallax Scrolling?
Parallax is the way nearby objects appear to move faster than distant ones when you travel past them. From a train window the fence beside the track rushes by while the hills on the horizon hardly move. Parallax scrolling borrows that cue: when layers of a web page move at different speeds as you scroll, the slower ones read as further away.
The technique came from animation and early video games, where several background layers scrolled at different speeds to suggest depth, and it became popular on websites in the early 2010s. On a typical business site today it appears in one of three forms:
- A slow-moving background. A hero photograph or a full-width image band drifts more slowly than the text in front of it. This is the most common version and the most useful.
- Layered scenes. Several images, such as a foreground, a subject and a sky, each move at their own speed. It is striking on a campaign page and far too much for a services page.
- Fixed backgrounds. The image stays completely still while the page scrolls over it, like a view through a window. Strictly it is a simpler effect, but most people call it parallax too.
Why Use It, and When to Leave It Out
Parallax does one job well: it adds depth and a sense of quality to a page without asking the visitor to do anything. A hero image that moves slightly as the page starts to scroll feels more like a designed object and less like a photograph pasted behind some text. That can suit a hotel, a restaurant, a portfolio or any business where atmosphere is part of what is being sold.
It does nothing for clarity, though. It will not make a confusing page easier to understand, and it competes with the things you want people to notice. Leave it out when:
- the page exists to win one action, such as a booking or a quote request, and anything that draws the eye away from the button is a cost
- the image is doing a practical job, such as showing a product, where movement makes it harder to study
- the section contains a lot of text, because words in front of a moving background are harder to read
- you cannot test it properly on real phones
Tip: Ask what the page loses if the image stays still. If the honest answer is nothing, leave it still.
How Parallax Scrolling Is Built Today
There are three ways to build the effect, and they are not equally good.
| Method | How it works | Verdict |
|---|---|---|
| Scroll-driven animation in CSS | The browser links an animation to the scroll position and runs it on the compositor, the part of the browser that keeps scrolling smooth. | The best option. No JavaScript, smooth on phones and easy to switch off. |
JavaScript that moves a layer with transform | A script reads the scroll position and shifts the layer on each frame. | Fine on a desktop with a mouse. On touch screens it runs a frame behind the finger and can stutter. |
background-attachment: fixed | The background is pinned to the window while the page scrolls over it. | Simple, but it makes the browser repaint as you scroll, and iPhones have never handled it reliably. |
Scroll-driven animations are the change that made parallax respectable again. For years the effect needed JavaScript listening to scroll events, which is exactly the kind of work that makes a page feel sluggish. CSS can now tie an animation to how far an element has travelled through the window. Chrome and Edge have supported this since 2023, Safari since version 26, and Firefox switched it on by default in October 2026, so it works in the current version of every major browser.
.hero {
position: relative;
overflow: hidden;
isolation: isolate;
}
.hero-image {
position: absolute;
inset: 0;
z-index: -1;
background: url("hero.jpg") center / cover;
}
@keyframes drift {
to { transform: translateY(30%); }
}
@supports (animation-timeline: scroll()) {
.hero {
view-timeline-name: --hero;
}
.hero-image {
animation: drift linear both;
animation-timeline: --hero;
animation-range: exit 0% exit 100%;
}
}
@media (prefers-reduced-motion: reduce) {
.hero-image { animation: none; }
}Two details matter. The @supports rule keeps the animation away from older browsers, which would otherwise play it instantly and leave the image out of place. And because the movement only begins as the hero starts to leave the screen, the strip it uncovers at the top is never visible, so the image needs no extra height and is framed exactly as a still one would be.
Making It Work on Phones
Most parallax problems are phone problems. On a touch screen the page follows your finger directly, and the browser scrolls it on a separate thread so that it stays smooth even when the page is busy. A script that repositions an image in response to scroll events always runs slightly behind, so the image appears to tremble against the text. When we first added parallax to our own home page it looked right on a laptop and stuttered on an iPhone for exactly this reason.
The fix was to stop using JavaScript where it cannot keep up. Our hero now uses the CSS animation above wherever the browser supports it. Older browsers get a JavaScript version only if the device has a mouse or trackpad, and older touch devices simply get a still image. Nobody sees a broken effect. Some people see no effect, which is fine.
- Animate
transformonly. Changingbackground-position,topormarginmakes the browser redo its layout or repaint on every frame. - Keep the movement small. A layer that travels a fifth to a third of its own height is enough to read as depth.
- Serve a smaller, differently cropped image to narrow screens, because a wide landscape photograph rarely suits a tall phone.
- Check that the image still covers its section at both ends of the movement, or a strip of background colour will show.
- Test on a real iPhone and a real Android phone. A desktop browser's device preview does not reproduce touch scrolling.
Parallax and Motion Sensitivity
For some people, large areas of a screen moving at different speeds cause dizziness, nausea or headaches. It is common among people with vestibular disorders, and it is the reason every major operating system has a setting to reduce motion. Websites can read that setting through the prefers-reduced-motion media query, and a parallax effect should always respect it.
WCAG, the accessibility standard most organisations work to, includes a criterion at its strictest level that motion triggered by interaction, which includes scrolling, can be switched off unless it is essential. Honouring the reduced-motion setting is the accepted way to meet it, and it costs three lines of CSS. Our guide to web accessibility covers the rest of the standard.
Parallax, Page Speed and Search
Parallax has a reputation for slowing websites down, and with the older methods the reputation was earned. The effect itself is not the problem. The problems are the things that tend to come with it: very large images, animation libraries loaded for the sake of one effect, and scripts that run on every scroll event.
A hero image is usually the largest thing on the screen when a page loads, which makes it the element measured for Largest Contentful Paint, one of the Core Web Vitals. Compress it properly, serve a modern format and size it for the screen, as our guide to image optimisation explains. Build the movement in CSS and the effect adds almost nothing to the weight of the page.
Search engines neither reward nor penalise parallax as such. What matters is that the content is ordinary text in the page, that the site loads quickly and that it works on a phone. The old habit of building a whole website as one long parallax page did hurt search performance, because a single page can only be about so many things. Keep separate pages for separate subjects.
Common Parallax Mistakes
- Using it on every section. One moving layer is an accent. Five in a row are tiring to scroll through.
- Text over a busy moving image. Put a tint between the image and the words, and check the contrast at every point of the movement.
- Scroll hijacking. Taking control of how fast or how far the page scrolls so that an animation can play is a different thing from parallax, and visitors dislike it.
- Ignoring the reduced-motion setting. Respecting it is quick and removes a real barrier.
- Loading a large library for one effect. If the only animation on the site is one hero image, it needs no library at all.
- Never testing on a phone. The effect that looks smooth on a laptop is the one most likely to stutter in someone's hand.
Our guide to startup website mistakes covers the other habits that cost a new website its customers.
A Parallax Checklist
- Decide which single element will move, and why.
- Build it with a CSS scroll-driven animation inside an
@supportsrule. - Give older browsers a still image, or a JavaScript version on mouse-driven devices only.
- Switch it off under
prefers-reduced-motion. - Check the contrast of any text over the image throughout the movement.
- Compress the image and check the page's Largest Contentful Paint.
- Test on a real iPhone and a real Android phone.
Putting It Into Practice
Reading about a technique is the easy part. Applying it to a real business, with real content and a launch date, takes judgement about what to use and what to leave out. DigitalPod is a UK-based design and web development studio that designs every site from a blank page and builds it by hand, so a technique is used because it helps the business and not because a template came with it. If you would like a website designer to handle it for you, startup website design is what we specialise in, websites start from £2,400 and our website redesign service brings an older site up to date.
Frequently Asked Questions
What is parallax scrolling in simple terms?
It is an effect where the background of a web page moves more slowly than the content in front of it as you scroll. Because slower things look further away, the page appears to have depth.
Is parallax scrolling bad for SEO?
Not in itself. Search engines read the text and links on a page and are indifferent to how a background moves. Parallax harms search performance only indirectly, when it is built with heavy scripts and oversized images that slow the page down, or when a whole site is squeezed into one long page. A fast, well-structured page with one parallax image is at no disadvantage.
Does parallax scrolling work on mobile?
Yes, if it is built with a CSS scroll-driven animation, which current versions of Chrome, Edge, Safari and Firefox all support. Older script-based methods often stutter on touch screens, and background-attachment: fixed is unreliable on iPhones. Many sites sensibly show a still image on phones that cannot run the smooth version.
Is parallax scrolling outdated?
The heavy, whole-page parallax sites of the 2010s have dated. A single slow-moving hero image has not, and it is easier to build well now than it has ever been. Like most effects, it looks dated when it is overdone and lasts when it is subtle.
Can parallax scrolling make people feel ill?
It can. People with vestibular disorders, and others who are sensitive to motion, can feel dizzy or nauseous when parts of the screen move at different speeds. That is why devices have a reduce-motion setting, and why a responsible website turns parallax off when that setting is on.