Performance & UX
·8 min read

CSS Scroll Effects: 50 Interactive Animations to Try

167467

Scroll animations are a great way to add depth and interactivity to web pages. When done right, they can capture your users’ attention and boost retention.

This article showcases 50 CSS animations that turn scrolling—a simple, everyday action—into an opportunity to delight users and communicate your values and ideas in a visually compelling way.

Let’s dive in.

CSS scroll-based parallax animations

1. Parallax background

parallax background

Interactive CodePen loads when it gets near the viewport.

The parallax background animation by Misala applies a parallax effect to a nature scene, making it come alive.

2. Parallax scroll demo

Pure CSS parallax scroll demo #3 by Keith Clark

Interactive CodePen loads when it gets near the viewport.

The parallax scroll demo by Joncousins applies the effect to six layers.

3. CSS-only parallax scrolling

CSS only Parallax Scrolling

Interactive CodePen loads when it gets near the viewport.

Parallax scrolling by John Smith is yet another take on the parallax effect in action.

4. CSS parallax scroll

Pure CSS Parallax Scroll

Interactive CodePen loads when it gets near the viewport.

Parallax scroll by Emma Trayanova is another solid example of the parallax effect.

5. CSS-only parallax scroll

CSS-only Parallax Scroll

Interactive CodePen loads when it gets near the viewport.

CSS scroll-based sticky effects

6. Sticky full page slides

16. Sticky full page slides

Interactive CodePen loads when it gets near the viewport.

The sticky full-page slides animation by Laurits has a scroll + parallax effect, in which the different pages snap into and out of view as the user scrolls.

7. Sticky section layout

just another sticky section layout

Interactive CodePen loads when it gets near the viewport.

The sticky section layout by Misala features two effects: parallax and a sticky sidebar. As you scroll down, the sidebar remains fixed. This type of effect is commonly used for elements like table of contents in blogs.

8. Sticky stacking on scroll

sticky stacking on scroll - desktop

Interactive CodePen loads when it gets near the viewport.

The sticky stacking effect by Misala showcases six cards stacked on themselves. You’ll notice a bouncing effect occurs as you scroll.

9. Responsive sticky header navigation

Responsive sticky header navigation

Interactive CodePen loads when it gets near the viewport.

The responsive sticky header navigation by MarcLibunao features a navigation menu that appears on scroll and sticks in place at the top of the page.

10. Responsive sticky sidebar

Responsive Sticky Sidebar

Interactive CodePen loads when it gets near the viewport.

The responsive sticky sidebar by Dareen showcases a sidebar that remains fixed in place while scrolling up or down the page.

11. Sticky parallax sections

CSS Sticky Parallax Sections

Interactive CodePen loads when it gets near the viewport.

Ryan Mulligan’s sticky parallax section combines the sticky and parallax sections, causing the background images to momentarily hook when scrolled into view.

12. Sticky navigation with smooth scrolling

Sticky Navigation Menu With Smooth Scrolling

Interactive CodePen loads when it gets near the viewport.

The sticky navigation with smooth scrolling by Praveen Bisht features a sticky navigation that shrinks when you scroll down and expands when you scroll back up. It’s a small but fun interaction that can improve the UX of a website.

13. Stacked cards effect

Stacked cards effect (no JS) - timeline-view

Interactive CodePen loads when it gets near the viewport.

The stacked cards effect by Hugo Salazar applies a sticky effect to a group of cards.

14. GSAP stacked cards

Stacked cards #GSAP

Interactive CodePen loads when it gets near the viewport.

Another stacked card effect by Hugo Salazar that’s sure to make your content “stick” 😉. Only that this pen is powered by GSAP.

Ready for next-level scroll effects?

Learn to animate 3D models with GSAP and Three.js in our interactive course! In this creative course, we guide you through building a scroll-animated 3D landing page using Next.js 14, GSAP, Prismic, Three.js, Tailwind, and TypeScript.

GIF of Fizzi website

CSS text scroll animations

15. Slice slider

Slice Slider

Interactive CodePen loads when it gets near the viewport.

The slice slider effect by Stephen Scaff causes different copies to slide into view as you scroll up or down the page.

16. 3D spatial scroll zoom

3D spacial scroll zoom with CSS Scroll Animation

Interactive CodePen loads when it gets near the viewport.

The 3D spacial scroll zoom effect by Adam Argyle makes it feel like you’re entering into the screen as you scroll. It's a mesmerizing and engaging effect.

17. CSS scroll animation

CSS Scroll Animation

Interactive CodePen loads when it gets near the viewport.

Jazz Peh’s CSS scroll animation features groups of text with different backgrounds that slide into view as you scroll down and slide out of view when scrolling back up.

18. Text scroll on reveal effects

No JS char by char on scroll reveal effects

Interactive CodePen loads when it gets near the viewport.

The text scroll on reveal effects by Ana Tudor applies seven types of effects to seven different copies on scroll, giving you different options to choose from.

19. CSS scroll-triggered animation with style queries

CSS scroll-triggered animations with style queries

Interactive CodePen loads when it gets near the viewport.

CSS scroll-triggered animation with style queries by Ryan Mulligan applies scale-up and gradient effects to text as you scroll.

20. Scroll-driven fade-in

CSS Animation Timeline - scroll driven fade-in

Interactive CodePen loads when it gets near the viewport.

The scroll-driven fade-in effect by Michael applies a fade-in effect to text and images on scroll.

21. CSS text scroll animation

CSS Scroll Animation

Interactive CodePen loads when it gets near the viewport.

The text scroll animation by Ssonko Jimmy causes some text to fade and tilt into view on scroll.

22. Duplicate text scroll animation

CodePen

Interactive CodePen loads when it gets near the viewport.

Mias’s text animation starts with some text that duplicates on page load. The text splits in two as you scroll down, only to come back together when you scroll up.

23. Scroll-based animation

trigger a css animation on scroll

Interactive CodePen loads when it gets near the viewport.

The scroll-based animation by Johnson5409 features different text that scales and fades into view on scroll.

24. Marquee page border

GSAP ScrollTrigger - Marquee Page Border

Interactive CodePen loads when it gets near the viewport.

The marquee page border by Ryan Mulligan uses some text to create a marquee border. The border text moves clockwise or counterclockwise as you scroll up and down the page; the text moves clockwise or counterclockwise, respectively.

CSS image scroll animations

25. Zoom and blur background image

Zoom and Blur background Image

Interactive CodePen loads when it gets near the viewport.

The zoom and blur background image by Zach Richard causes the background image to blur and zoom out of view as you scroll. The degree of the effect is controlled by how far up or down you scroll.

26. GSAP ScrollTrigger image zoom

gsap ScrollTrigger Image Zoom

Interactive CodePen loads when it gets near the viewport.

The GSAP ScrollTrigger image zoom by Misala is an interesting scroll effect that adds 3D depth to the background image, making it feel real and immersive.

27. CSS inverted reveal scroller 📜

CSS Inverted Reveal Scroller 📜

Interactive CodePen loads when it gets near the viewport.

The inverted reveal scroller by Jhey causes images to slide up or down into view (depending on your direction) as you scroll through the page.

28. Slider transitions

Slider transitions

Interactive CodePen loads when it gets near the viewport.

The slider transitions effect by Mirko Zorić features images and text that smoothly transition into view on scroll.

29. CSS scroll animation with subgrid

The Craft of UI: Playbook CSS scroll animation w/ subgrid

Interactive CodePen loads when it gets near the viewport.

The scroll animation with subgrid causes a grid of images to appear on scroll.

30. Scroll image effect

Scroll Image Effects

Interactive CodePen loads when it gets near the viewport.

Bokoko33’s scroll image effect applies a glitchy, wave-like effect to images on scroll. The intensity of the effect depends on the speed at which you scroll.

31. Image transition on scroll

Image Transition On Scroll(GSAP)

Interactive CodePen loads when it gets near the viewport.

Image transition on scroll by Yugam applies a unique effect to images on the page and is delightful to look at.

32. Multi-filters

Image Effects

Interactive CodePen loads when it gets near the viewport.

The multi-filters effect by Dominic Suter applies different filters to an image as you scroll through different sections of the page. It's a great showcase of how CSS filters affect the appearance of images.

33. Sky scroll animation

Codevember 4 :: Sky

Interactive CodePen loads when it gets near the viewport.

The sky scroll animation by Magnificode applies a mask effect to a “SKY” text and splits the image on scroll.

CSS-Only Horizontal Parallax Gallery

Interactive CodePen loads when it gets near the viewport.

The horizontal parallax gallery effect by Paulina Hetman applies horizontal scroll to an image gallery. There’s also a slight shift and change in color that occurs when you hover over the images.

First time here? Discover what Prismic can do!

👋 Meet Prismic, your solution for creating performant websites! Developers, build with your preferred tech stack and deliver a visual page builder to marketers so they can quickly create on-brand pages independently!

Some more CSS scroll animations

35. Eye scroll

Eye Scroll: CSS Scroll Animation

Interactive CodePen loads when it gets near the viewport.

Rem’s eye scroll animation features eyes that rotate as you scroll through the page. The background color of the page also changes on scroll.

36. Changing background color while scrolling

Changing Background Color while scrolling

Interactive CodePen loads when it gets near the viewport.

This scrolling effect by JP Nothard changes the page's background as you scroll vertically.

37. Full-screen navigation bar

Full-Screen Navigation Bar: Pure CSS Scroll Animation

Interactive CodePen loads when it gets near the viewport.

The full-screen navigation bar by Andrej Sharapov has different effects based on the direction of scroll.

  • Vertical scroll: Features a sidebar with text that becomes clear as you scroll. It also includes a background image and a picture of a plane that moves through the screen
  • Horizontal scroll: This version doesn't have a sidebar. However, all elements move through the screen on hover

38. Scroll-driven scroll-snapping animations

CSS scroll-driven scroll-snapping animations

Interactive CodePen loads when it gets near the viewport.

The scroll-driven scroll-snapping animation by Giana features five sections that transition from one to another on scroll. It has four scroll modes: blink, horizontal, backward, and zoom, each with a different type of transition.

39. Curved SVG background animation

Curve SVG Background Animation

Interactive CodePen loads when it gets near the viewport.

The curved SVG background animation by Arman uses an SVG to create a curved background as you scroll.

40. Change background color with GSAP ScrollTrigger

Change background colour with GSAP ScrollTrigger

Interactive CodePen loads when it gets near the viewport.

This background scroll effect uses a sprinkle of JavaScript, specifically the GSAP library, to create this animation. It changes the page's background color on scroll and applies a parallax effect to the text.

41. Masthead webpage

Pure CSS: Scroll-driven Animations (Responsive Webpage)

Interactive CodePen loads when it gets near the viewport.

The masthead webpage animation by Andrej Sharapov is a creative playground with various effects triggered on scroll. It includes text effects, progress bars, and more.

42. Highlight text

ScrollTrigger - Highlight Text

Interactive CodePen loads when it gets near the viewport.

The highlight text effect by Ryan Mulligan highlights different parts of a writeup as you scroll. It provides three styles of highlights: background, half, and underline.

43. Reading indicator

CSS Scroll Animation Timeline (css only)

Interactive CodePen loads when it gets near the viewport.

The reading indicator effect by Hugo Salazar creates a progress bar on scroll.

44. Scroll reveal effect with intersection observer

Scroll Reveal Animation (Intersection Observer)

Interactive CodePen loads when it gets near the viewport.

The scroll reveal effect by Higo Salazar is a take on the classic scroll effect where different sections of a page fade into view as you scroll through.

45. Airplanes

Airplanes.

Interactive CodePen loads when it gets near the viewport.

Airplanes by Steve Gardner takes things to the next level. It’s difficult to describe — you just have to see it yourself!

46. ScrollifyJS + AnimateCSS + CSS flexbox

ScrollifyJS + AnimateCSS + Flexbox

Interactive CodePen loads when it gets near the viewport.

This pen by Zeindelf showcases various types of animations for you to choose from.

47. CSS scroll bars

CSS Scroll Bars

Interactive CodePen loads when it gets near the viewport.

CSS scroll bars by Ghost Rider features four tubes, think fluid in a pencil, with its content going up or down as you scroll.

48. 3D CSS scroll

3D CSS Scroll

Interactive CodePen loads when it gets near the viewport.

3D CSS scroll by Shaw creates a 3D-edge effect with alternating tiles.

49. CSS shadow on scroll

CSS only Scrolling shadow

Interactive CodePen loads when it gets near the viewport.

Temani Afif’s scrolling shadow applies a shadow to the top and bottom of a container on scroll.

50. CSS timeline animation

Scroll-Driven Animations - Timeline

Interactive CodePen loads when it gets near the viewport.

Ryan Timble’s timeline animation showcases a timeline element. As you scroll down the page, the different moments of the timeline transition into view.

CSS scroll animation tools and libraries you should know

Animate on scroll (AOS)

Animate on scroll library GIF

AOS is a lightweight JavaScript library that allows you to add animations to elements as they scroll into view on a webpage. This enhances user experience by making web pages more interactive and engaging.

AOS’ scroll animations cut across 4 categories: fade, flip, slide, and zoom. There are over 20 animations in total.

GSAP’s scroll plugins

Scroll GSAP library GIF

GSAP offers the following scroll plugins:

  • ScrollTrigger allows you to create animations that respond to the user's scroll position. It can trigger animations when elements enter or leave the viewport, synchronize animations with scrolling, and pin elements during scroll.
  • ScrollSmoother uses the browser's native scroll behavior to create smooth scrolling effects. It allows for parallax effects, where elements move at different speeds during scroll, and lag effects, where elements take time to "catch up" to the scroll position.
  • ScrollToPlugin allows you to create link-based animations where users scroll to specific positions or elements on a webpage when links are clicked.
  • Observer detects various user interactions, like scrolling, dragging, or swiping. You can use it to create animations or effects that respond to these actions. For example, you can set up an animation to play when a user scrolls down or to navigate slides when they swipe left or right.

Tailwind CSS animation on scroll (TAOS)

Tailwind Animation on Scroll GIF

Tailwind CSS is a popular utility-first CSS framework. However, it doesn’t provide built-in functionalities for creating scroll animations. Thankfully, you can use tools like TAOS for scroll-triggered animations.

TAOS is a lightweight (approximately 600 bytes) JavaScript library designed to integrate seamlessly with Tailwind CSS. It allows you to apply animations to elements when they enter the viewport during scrolling, utilizing Tailwind's Just-In-Time (JIT) mode and responsive utility classes.

TAOS provides 20 animations across categories: slide, grow, shrink, and flip. It allows you adjust the duration, delay, offset, easings, and repeat of your scroll effects.

Conclusion

We’ve explored various interesting, engaging, and eye-catching scroll animations in this article. Hopefully, they’ve inspired you and will be used in future projects.

Check out the following resources if you’d love to see more CSS animation examples:

Article written by

Alison Brunk

Alison is a technical content strategist at Prismic. She is passionate about design and web development and loves learning new tools and frameworks. In her free time, she loves playing golf and painting.

More posts
A headshot of Alison Brunk

Join the discussion

Hit your website goals

Websites success stories from the Prismic Community

How Arcadia is Telling a Consistent Brand Story

Read Case Study

How Evri Cut their Time to Ship

Read Case Study

How Pallyy Grew Daily Visitors from 500 to 10,000

Read Case Study

From Powder to Pixels - Perfectly Planned Ski Vacations, Now Perfectly Digital

Read Case Study