5 ways to add a parallax scrolling effect to your website

February 20, 2025
0 minute read

Thomas Deininger, a Rhode Island based artist, has garnered over half a million followers on Instagram with his captivating sculptures. Each piece uses non-recyclable, non-biodegradable materials to create beautiful renditions of living creatures—mostly birds. When you look at his work from straight on, they appear to be a hyper-realistic recreation of a particular animal. However, from the side they look entirely different. They look like bundled trash.




What you’re witnessing in the video above is a manipulation of “parallax.” According to the Cambridge Dictionary, parallax, a byproduct of human stereo vision, is the effect by which the position of an object seems to change when it is looked at from different positions.


That’s not a very intuitive definition. Instead, if you can, hold out your thumb at arm's length, close one eye, line it up with a distant object, then quickly switch to the other eye while keeping your thumb still. You should be able to see your thumb “shift” positions relative to the background object. It may be slight, but what you’re witnessing is an example of parallax.


Deininger uses parallax artistically to highlight the relationship between our natural world and the trash we release into it. While maybe not as thought provoking, websites often attempt to create a form of “parallax effect” as well—typically to great artistic effect.


In the physical world, parallax depends on a couple factors, the main being a three dimensional space. Unless you’re creating some pretty new-age websites for devices like Meta’s Quest or the Vision Pro, your visitors are probably bound to two dimensions. That means, to achieve this effect, you’ll need to get creative.


What does parallax look like online?


Designers have been playing with the concept of depth in user interfaces for decades. If you’ve ever added a drop shadow to an image or a button, then you’ve attempted to recreate depth as well. Parallax is a natural extension of this.


Imagine a background image that moves slower than the foreground when scrolling, or an element that shifts position slightly in relation to your mouse. These are both different ways to recreate parallax on the web, with the former using scroll as the reference for position and the latter using the mouse.


We do this ourselves, both on our website as well as in our templates. Our “Chef Restaurant” template, created for a fictional restaurant named Baillotte, uses a parallax effect to tailor a more engaging experience for visitors.


Before we dive into all of the different ways you can recreate parallax online, it’s worth taking a moment to discuss an under-appreciated element of great design; moderation. Too many scroll animations or moving elements can be jarring and disruptive, not to mention an accessibility nightmare.


Visitors with motion sensitivity, vestibular disorders, or other neurological conditions certainly won’t appreciate a website with elements moving everywhere from all directions. To offer the best experience to the widest audience, consider:


  • Keeping parallax effects to a minimum. Don’t disorient your users or distract them from meaningful information. Keep it decorative!
  • Restrict movements to small areas of the screen. An element shouldn’t move dramatically across the screen, that would be disorienting.
  • Don’t go too fast. Quick motion, particularly with mouse-based parallax effects, can look jerky and unattractive. Subtlety is key.


With that out of the way, let’s take a look at five different ways to achieve a parallax effect on your website.


Fixed background


A fixed background is what most designers would imagine when asked to describe a “parallax effect.” Essentially, the background image doesn’t move while all other elements do. You can see this in action in the Chef Restaurant template mentioned earlier, or via the image below.



One reason why this effect is so ubiquitous is that it’s incredibly easy to implement. Using CSS, all you really need to do is apply the code background-position: fixed;. Drag-and-drop website builders make it even easier. In Duda’s Editor 2.0, this effect can be achieved by selecting “Static” in the design panel via the “Image position type” portion of the “Background” section.


Vertical scrolling


Vertical scrolling is a little different, and a little more authentic. In this scenario, the background and foreground move at varying speeds. This is much more difficult to implement using code, but is exceptionally easy in Duda.


Using the exact same design panel as before, we can apply a background image then select the aptly named “Parallax” option within the “image position type” portion of the “Background” section. The effect, shown below, is a background image that moves slightly slower than the elements placed on top of it.



Note that you won’t be able to achieve a parallax scrolling effect by using a solid colored background, and for good reason. If you remember our thumb example from earlier, an important part of the parallax effect is the relationship between the foreground and the background. If the background lacked an image, then there’d be no way to create that much needed relationship.


Horizontal scrolling


Horizontal scrolling is similar to, but far less common than, vertical scrolling. In this instance, elements may slowly move from one side to the other as a user scrolls vertically. The United Nations uses this effect heavily on their 2022 Sustainable Development Plan microsite.


If you’re an agency who builds websites for SMBs, this effect is probably overkill. However, a subtler version is very achievable.


In Duda, select any element you’d like to animate then choose, unsurprisingly, “Animations” from the design panel. Choose “Scroll” as the trigger, then “Slide” as the animation. You can play around with the exact parameters of this animation yourself, but so long as you’ve selected either “right” or “left” as the direction what you’re left with is a lovely parallax effect.


The best way to implement this, though, is to have another element that can act as a reference. To do that, follow the exact same steps as above on another nearby element, but ensure that the second element is set up to perform the animation at a slightly different speed than the first. You can see how that looks via the elements below.



Scroll-trigger animations



By now you should be picking up how parallax animations work. Two identifiable objects are moving at different speeds based on some trigger, like scrolling. While we’ve primarily used the background to achieve this, foreground objects can move at different speeds relative to each other as well via “scroll-trigger animations.”


We used an effect like this on the 2024 Dudacon website. As users scrolled towards the agenda summary, different columns rose at different speeds.



To do this in Duda, select the element you’d like to animate, then choose “Animations” from the design panel. Select “Scroll” as the trigger and “Slide” as the animation, then play around with different properties until you’re happy with the speed and distance that the animation occurs. This is very similar to how we achieved the horizontal scrolling parallax effect, but in this scenario we are operating in any direction, not just left and right.


Mouse-based parallax



In every example we’d used up until this point, the user’s point of reference is determined by their scroll position. However, the mouse is another great way to achieve this effect. Keep in mind, though, that dramatic movements in relation to the mouse can create a poor user experience. As always, work in moderation.


See the Pen Parallax effect by Clément Gaudinière ( @clement-gaudiniere ) on CodePen.


Consider the example code above written by Clément Gaudinière. Orbs in the background move in relation to the mouse. Unlike earlier examples where elements moved in relationship to each other to create a parallax effect, this example uses the cursor itself as the focal point.


Duda doesn’t support cursor-based animations out-of-the-box, so you’ll need to put on your developer hat to achieve this effect. Luckily, with tools like Custom Widgets, HTML blocks, and Dev Mode, implementing really bespoke experiences like this are pretty easy.


However, if you do decide to go this route, consider offering a way for users to turn it off. Unlike other parallax effects, this method has the greatest potential for accessibility issues. HTML standardized media queries like “prefers reduce motion” make respecting user preferences around animations super easy.


What’s next?


Now that you’ve seen a few ways to add parallax effects to your website, the next step is to actually do it. Many of our newer templates use parallax effects, and plenty of websites on our inspiration page do too. If that’s not cutting it, our Facebook Community is a great place to connect with other website building professionals. Take a peak at what they’ve built, and don’t be afraid to ask how they did it! Once you’ve made something you’re proud of, be sure to share it too. The next generation of designers will thank you.



Did you find this article interesting?


Thanks for the feedback!
By Shawn Davis April 1, 2026
Core Web Vitals aren't new, Google introduced them in 2020 and made them a ranking factor in 2021. But the questions keep coming, because the metrics keep changing and the stakes keep rising. Reddit's SEO communities were still debating their impact as recently as January 2026, and for good reason: most agencies still don't have a clear, repeatable way to measure, diagnose, and fix them for clients. This guide cuts through the noise. Here's what Core Web Vitals actually measure, what good scores look like today, and how to improve them—without needing a dedicated performance engineer on every project. What Core Web Vitals measure Google evaluates three user experience signals to determine whether a page feels fast, stable, and responsive: Largest Contentful Paint (LCP) measures how long it takes for the biggest visible element on a page — usually a hero image or headline — to load. Google considers anything under 2.5 seconds good. Above 4 seconds is poor. Interaction to Next Paint (INP) replaced First Input Delay (FID) in March 2024. Where FID measures the delay before a user's first click is registered, INP tracks the full responsiveness of every interaction across the page session. A good INP score is under 200 milliseconds. Cumulative Layout Shift (CLS) measures visual stability — how much page elements unexpectedly move while content loads. A score below 0.1 is good. Higher scores signal that images, ads, or embeds are pushing content around after load, which frustrates users and tanks conversions. These three metrics are a subset of Google's broader Page Experience signals, which also include HTTPS, safe browsing, and mobile usability. Core Web Vitals are the ones you can most directly control and improve. Why your clients' scores may still be poor Core Web Vitals scores vary dramatically by platform, hosting, and how a site was built. Some of the most common culprits agencies encounter: Heavy above-the-fold content . A homepage with an autoplay video, a full-width image slider, and a chat widget loading simultaneously will fail LCP every time. The browser has to resolve all of those resources before it can paint the largest element. Unstable image dimensions . When an image loads without defined width and height attributes, the browser doesn't reserve space for it. It renders the surrounding text, then jumps it down when the image appears. That jump is CLS. Third-party scripts blocking the main thread . Analytics pixels, ad tags, and live chat tools run on the browser's main thread. When they stack up, every click and tap has to wait in line — driving INP scores up. A single slow third-party script can push an otherwise clean site into "needs improvement" territory. Too many web fonts . Each font family and weight is a separate network request. A page loading four font files before rendering any text will fail LCP, especially on mobile connections. Unoptimized images . JPEGs and PNGs served at full resolution, without compression or modern formats like WebP or AVIF, add unnecessary weight to every page load. How to measure them accurately There are two types of Core Web Vitals data you should be looking at for every client: Lab data comes from tools like Google PageSpeed Insights, Lighthouse, and WebPageTest. It simulates page loads in controlled conditions. Lab data is useful for diagnosing specific issues and testing fixes before you deploy them. Field data (also called Real User Monitoring, or RUM) comes from actual users visiting the site. Google collects this through the Chrome User Experience Report (CrUX) and surfaces it in Search Console and PageSpeed Insights. Field data is what Google actually uses as a ranking signal — and it often looks worse than lab data because it reflects real-world device and connection variability. If your client's site has enough traffic, you'll see field data in Search Console under Core Web Vitals. This is your baseline. Lab data helps you understand why the scores are what they are. For clients with low traffic who don't have enough field data to appear in CrUX, you'll be working primarily with lab scores. Set that expectation early so clients understand that improvements may not immediately show up in Search Console. Practical fixes that move the needle Fix LCP: get the hero image loading first The single most effective LCP improvement is adding fetchpriority="high" to the hero image tag. This tells the browser to prioritize that resource over everything else. If you're using a background CSS image for the hero, switch it to anelement — background images aren't discoverable by the browser's preload scanner. Also check whether your hosting serves images through a CDN with caching. Edge delivery dramatically reduces the time-to-first-byte, which feeds directly into LCP. Fix CLS: define dimensions for every media element Every image, video, and ad slot on the page needs explicit width and height attributes in the HTML. If you're using responsive CSS, you can still define the aspect ratio with aspect-ratio in CSS while leaving the actual size fluid. The key is giving the browser enough information to reserve space before the asset loads. Avoid inserting content above existing content after page load. This is common with cookie banners, sticky headers that change height, and dynamically loaded ad units. If you need to show these, anchor them to fixed positions so they don't push content around. Fix INP: reduce what's competing for the main thread Audit third-party scripts and defer or remove anything that isn't essential. Tools like WebPageTest's waterfall view or Chrome DevTools Performance panel show you exactly which scripts are blocking the main thread and for how long. Load chat widgets, analytics, and ad tags asynchronously and after the page's critical path has resolved. For most clients, moving non-essential scripts to load after the DOMContentLoaded event is a meaningful INP improvement with no visible impact on the user experience. For websites with heavy JavaScript — particularly those built on frameworks with large client-side bundles — consider breaking up long tasks into smaller chunks using the browser's Scheduler API or simply splitting components so the main thread isn't locked for more than 50 milliseconds at a stretch. What platforms handle automatically One of the practical advantages of building on a platform optimized for performance is that many of these fixes are applied by default. Duda, for example, automatically serves WebP images, lazy loads below-the-fold content, minifies CSS, and uses efficient cache policies for static assets. As of May 2025, 82% of sites built on Duda pass all three Core Web Vitals metrics — the highest recorded pass rate among major website platforms. That baseline matters when you're managing dozens or hundreds of client sites. It means you're starting each project close to or at a passing score, rather than diagnosing and patching a broken foundation. How much do Core Web Vitals actually affect rankings? Honestly, they're a tiebreaker — not a primary signal. Google has been clear that content quality and relevance still dominate ranking decisions. A well-optimized site with thin, irrelevant content won't outrank a content-rich competitor just because its CLS is 0.05. What Core Web Vitals do affect is the user experience that supports those rankings. Pages with poor LCP scores have measurably higher bounce rates. Sites with high CLS lose users mid-session. Those behavioral signals — time on page, return visits, conversions — are things search engines can observe and incorporate. The practical argument for fixing Core Web Vitals isn't just "because Google said so." It's that faster, more stable pages convert better. Every second of LCP improvement can reduce bounce rates by 15–20% depending on the industry and device mix. For client sites that monetize through leads or eCommerce, that's a revenue argument, not just an SEO argument. A repeatable process for agencies Audit every new site before launch. Run PageSpeed Insights and record LCP, INP, and CLS scores for both mobile and desktop. Flag anything in the "needs improvement" or "poor" range before the client sees the live site. Check Search Console monthly for existing clients. The Core Web Vitals report surfaces issues as they appear in field data. Catching a regression early — before it compounds — is significantly easier than explaining a traffic drop after the fact. Document what you've improved. Clients rarely see Core Web Vitals scores on their own. A monthly one-page performance summary showing before/after scores builds credibility and makes your technical work visible. Prioritize mobile. Google uses mobile-first indexing, and field data shows that mobile CWV scores are almost always worse than desktop. If you only have time to optimize one version, do mobile first. Core Web Vitals aren't a one-time fix. Platforms change, new scripts get added, campaigns bring in new widgets. Build the audit into your workflow and treat it like any other ongoing deliverable, and you'll stay ahead of the issues before they affect your clients' rankings. Duda's platform is built with Core Web Vitals performance in mind. Explore how it handles image optimization, script management, and site speed automatically — so your team spends less time debugging and more time building.
By Ilana Brudo March 31, 2026
Vertical SaaS must transition from tools to an AI-powered Vertical Operating System (vOS). Learn to leverage context, end tech sprawl, and maximize retention.
By Shawn Davis March 27, 2026
Automate client management, instant site generation, and data synchronization with an API-driven website builder to create a scalable growth engine for your SaaS platform.
Show More

Latest posts