CSS scroll animation templates
CSS scroll-driven animations tie a CSS animation to scrolling instead of the clock: with animation-timeline: view() an element's keyframes advance as it crosses the screen, and with scroll() as a scroll container moves. These 20 free templates run every scroll scene that way, one HTML file each, with a short inline script for measuring and smooth wheel scrolling and no JavaScript library.
Each page here began as a GSAP build and was rebuilt so the visitor sees the same motion with less code: a held stage whose panels run sideways, piles of photos dealt into a grid, a first screen that breaks apart as you leave it. No script comes from a CDN. The brasserie page, the lightest of the set, downloads 24 KB of code gzipped, where its GSAP version needs 73 KB and four more requests.
If you came looking for CSS scroll animations you can open, edit and ship, these are whole sites rather than snippets: twelve or thirteen sections, a form, a phone menu, a full layout that still reads when nothing moves. Every one works as a scroll animation website template for a real business type. The other 81 templates in the catalog keep GSAP, ScrollTrigger and Lenis, and the catalog's page on scroll motion covers all 101.
At a glance, November 2026. This page holds 20 templates, free under the MIT license and made by 8B, an AI website builder. Grouped by gzipped code: eight need 24 to 27 KB (brasserie, creative agency, print studio, accounting firm, cat boarding house, architecture office, fitness club, florist), eight need 29 to 32 KB (repair shop, smart-home remote, accountancy practice, brewery, veterinary clinic, construction company, design studio, community club), three need 35 to 41 KB (captioning app, trampoline park, music festival) and the coworking space 53 KB. Their GSAP builds need 71 to 98 KB and three to five more requests. Each page has 12 or 13 sections.
Launch page for a smart-home remote, 30 KB of code gzipped. Scrolling sinks the drawn panel while its keys press one by one, and on a held stage the pad presses each direction as room photos wipe in.
Landing page for a call captioning app, 35 KB gzipped. Spoken lines drawn as bars slide into a panel and turn into caption bubbles, and on a held stage five places pass sideways under two drawn curves.
Creative agency site, 26 KB gzipped. Leaving the first screen splits the wordmark, its letters sliding off both sides with long black streaks; further down, plates fan out behind each project photo and fold flat.
Design studio page, 31 KB gzipped. The round photo travels down into the next heading's violet dot, case cards run sideways and bend onto a curve, and service cards stick and stack.
Women's community club, 32 KB gzipped. An oxblood arch swells into a full-width dome as you leave the first screen, and on a held board twelve tilted tiles deal out of one pile into a collage.
Cat boarding house, 27 KB gzipped. A black hill swallows the first screen, then a held day track slides six timed panels sideways while a black sun crosses a sky that changes colour.
Music festival page, 41 KB gzipped. A crimson veil closes into nine round windows, and in the held battle split screen the VS line sweeps to each side as the crews' names grow.
Print studio with a price calculator, 26 KB gzipped. Four pink drums roll down onto a panel and print it band by band; later a drum rolls beside the workshop list, filling each date.
Architecture office, 27 KB gzipped. Street photos start as streaks of stretched colour and squeeze into focus, a held row passes five buildings sideways, and a red scan line crosses the method photo.
Fitness club, 27 KB gzipped. Cover lines streak off sideways while the photo zooms, tiles are dealt from a tilted pile, and seven day cards run sideways on a held stage as a progress line fills.
Phone and laptop repair shop, 29 KB gzipped. On tall desktop screens a blue band steps down twelve diagnosis checks, the refurbished shelf runs sideways, and a blue cursor sweeps the pickup timetable.
Small accountancy practice, 30 KB gzipped. Service photos resolve from coarse dots as colour slabs stack on large screens, and twelve months slide past a fixed orange line, filling each deadline chip.
Accounting firm, 26 KB gzipped. On a held stage a sphere of 28 client cards rises and turns almost a full circle, and a red marker crosses the month's ruler, turning each task black.
Brasserie or bistro, the lightest at 24 KB gzipped. A blurred parasol shadow slides across the hero dish, and five services run sideways as the ground darkens from near-white to night.
Craft brewery and taproom, 30 KB gzipped. On desktop five beer cards step down a staircase, each filling with colour like a poured glass, and a dashed wheel turns one brew step at a time.
Coworking space, the heaviest at 53 KB gzipped. Contour bands swell around the core until deep blue fills the screen, and posters lower on their wires and swing as their bands appear.
Trampoline park, 39 KB gzipped. A jumper lands on the red panel's wavy edge, which sags and flings them off spinning, and a red ball hops along a dashed route between party photos.
Veterinary clinic, 30 KB gzipped. A small coral arch grows into a full-width doorway as you scroll, and four colour panels are dealt out of a tilted stack into an overlapping row.
What CSS scroll-driven animations are and what they replace
A CSS animation normally runs on the document clock: it starts, lasts so many seconds and ends. A scroll-driven animation swaps that clock for a scroll position, and two kinds of timeline exist. scroll() follows the progress of a scroll container or the whole page from top to bottom, which suits a reading bar. view() follows one element as it enters, crosses and leaves the visible area, which suits reveals and scenes tied to a section. animation-range picks the stretch of that journey the keyframes cover, for example cover 5vh cover 45vh.
These templates use view() and named view timelines (view-timeline: --name block on a section, read by the elements inside it); none of them needs scroll(). What used to be a scrubbed GSAP timeline is now keyframes plus a range, so no script recalculates styles on every scroll event, and the browser can run transform and opacity changes off the main thread. A CSS scroll-driven animation website built this way keeps its motion in the stylesheet, where it is easy to read and to search.
How the scroll animation is built without a library in these files
Every file follows the same order, and an agent that knows it can work safely.
- The gate. A two-line script in the head sets
data-8b-liveon<html>only when the browser supportsanimation-timeline: view()and the visitor has not asked for reduced motion. Every scroll rule is written under[data-8b-live], so without the attribute none of them applies. - The scenes in CSS. Keyframes and ranges per section, in style blocks marked with
data-8b-part. Pinned stages are plainposition: stickyinside a taller section. - The motion kit. One inline script of small modules. It measures what CSS cannot know (how far a track must travel, where a drum must land) and writes it into custom properties, adds an
is-inclass todata-8b-motionelements as they arrive, numbers the items of eachdata-8b-itemsgroup as--iand--nfor staggers, and pauses looping animations off screen. Ten of the files also split headings into lines or letters. - Scene scripts. Up to seven short blocks per file, each measuring one section. If one throws an error, the kit logs it and switches that section's scene styles off, so the section stays in its finished layout and the others keep moving.
Smooth wheel scrolling stays. A few lines of the kit ease mouse wheel and trackpad input toward the target position, leave inner scroll areas and pinch zoom alone, and keep touch scrolling native, which is the job Lenis did in the GSAP build.
CSS scroll animation examples, grouped by kind of motion
The groups follow the scene each page is remembered for; most pages hold several kinds.
- Held stages with a sideways track. A sticky stage stays put while panels run sideways as you scroll down: the print studio's five press stations, the brasserie's five services, the cat boarding day, the architecture office's buildings, the fitness week, the florist's evening hours, the accountancy months and the repair shop's shelf. The kit measures each track's overflow and sets the section's height to match.
- Piles dealt into place. Photos or panels start as a tilted pile in the middle and land in their spots: the community club's twelve-tile board, the fitness disciplines, the veterinary colour panels, the construction gallery and the florist's events.
- A first screen that changes as you leave it. The agency wordmark tears apart, the construction wall breaks block by block, the trampoline jumper is thrown off a sagging edge, and on the members' workspace page the visitor falls into a blue contour field.
- Stacking cards and sticky frames. The design studio's service cards stick and stack, each shrinking under the next; the accountancy slabs push each other back; the construction services swap photos inside one sticky frame.
- Lines and rings that draw. A violet arc rounds the design studio's method ring, the accounting firm closes three red rings in turn, and the captioning app draws two curves through its places.
A pinned section scroll animation, a stacking cards scroll animation or a dealt pile can be lifted into another site, but not alone: take the section's scene styles, its scene script if it has one, and the motion kit with the gate.
Weight of a CSS scroll animation template against its GSAP build
Measured as the gzipped code a visitor downloads (HTML plus scripts, without fonts and photos), the native pages need 24 to 53 KB and their GSAP builds 71 to 98 KB. The difference is the libraries: GSAP, ScrollTrigger and Lenis in every GSAP build, SplitText in ten of them and MotionPathPlugin in one. Each native page therefore makes three to five fewer requests.
The HTML file itself grows, to 102 to 199 KB before compression, because the keyframes of every scene are written out in CSS. Repetitive CSS compresses well, which is why the gzipped totals still fall by about half to two thirds per template. Fonts still load from Google Fonts and photos from Unsplash's servers; what is gone is every script from a CDN.
For a lightweight website template that still moves, that is the trade: one self-contained file a coding agent can read whole, with no library version to pin, update or keep in step with another.
Browser support for CSS scroll-driven animations and the static fallback
Chrome and Edge support scroll-driven animations since version 115, and recent Safari versions run them too. Firefox does not ship them by default yet, so there the gate never sets data-8b-live. The same happens for anyone who has turned on reduced motion in their system settings.
In both cases the page shows its finished static layout: each section as its scene would end, ordinary scrolling with no smoothed wheel, sideways tracks as plain grids or rows. No content waits hidden for an animation that never comes. In Firefox the first screen still plays its load-in, since that is a time-based CSS animation, and hover effects work everywhere; reduced motion stops the load-in too. Each template's own page says what its layout becomes.
Whoever needs the scroll motion in Firefox as well can take the GSAP build: every one of these repositories also holds index.gsap.html, the same design on GSAP, ScrollTrigger and Lenis from jsDelivr. Edit one of the two files, not both.
curl -LO https://raw.githubusercontent.com/8bsite/<repository>/main/index.gsap.htmlEditing CSS scroll animations with an AI agent
Any agent that edits files works here, since the motion is CSS and inline script next to the markup. What breaks it quietly is a renamed class or a dropped attribute: the page looks fine at rest and one section stops moving. The rules are short. Keep the gate script in the head, every data-8b-* attribute and every data-8b-part block. Add or remove items inside a data-8b-items group freely, since the kit renumbers them. Add no GSAP or other animation library: the scenes are already built.
To retime a scene, change its animation-range; to calm it, soften its keyframes; to switch it off, delete that section's scene styles and scene script, and the section keeps its finished layout. In Claude Code, start in the folder with AGENTS.md beside the file: it names the parts the kit and the CSS read.
The motion is also written out in words, section by section, in each template's DESIGN.md, which helps when you rebuild the look in another stack. A prompt for the edit:
Read AGENTS.md, then edit index.html for my business: [what it is, who it serves, the facts I give you]. The scroll motion is CSS scroll-driven animations plus the inline motion kit: keep the motion-gate script in the head, every data-8b-* attribute, every data-8b-part block and the classes the scene scripts query. Change copy, photos and colours, not the motion, and add no animation library. Then check the page at 375 and 1440 px in Chrome, once with reduced motion on, and in Firefox, where it must show the finished static layout, with the console clean each time.Which CSS scroll animation template suits which site
- A restaurant that wants the lightest page: the brasserie, at 24 KB of code. Weak spot: its day of services runs sideways, so the hours must also read well in the plain grid that Firefox and reduced motion show.
- A shop that sells by quote: the risograph studio with its live price calculator. Weak spot: ordering opens an email; there is no cart, file upload or card payment.
- A firm that sells calm: the accounting firm, whose scenes are quiet rules, a marker and a turning sphere. Weak spot: each of the 28 sphere cards carries its own latitude and longitude in the markup, so another client count means new positions.
- An app launch: the captioning app page, with a sticky phone that adds each step's messages. Weak spot: the phone screens are built in HTML and CSS, so another app means redrawing them, and at 35 KB it is one of the heavier files here.
- A family venue: the trampoline park. Weak spot: in Firefox and with reduced motion the jumper and the hopping ball stay still, so the page has to sell on its photos and prices alone.
CSS scroll animation questions
What are CSS scroll-driven animations?
CSS animations whose progress follows scrolling instead of time. You set animation-timeline: view() to tie keyframes to an element crossing the screen, or scroll() to tie them to a scroll container's progress, and animation-range for the stretch they cover. No script has to listen to scroll events.
Can you make scroll animations with only CSS?
Mostly, yes. In these 20 templates every scroll scene is CSS. A short inline script still measures what CSS cannot know, such as how far a sideways track must travel, and smooths the mouse wheel. It is plain JavaScript inside the page, not a library.
Do CSS scroll-driven animations work in Firefox and Safari?
In recent Safari, yes, as in Chrome and Edge. Firefox does not run them by default yet, so these pages show their finished static layout there, with ordinary scrolling and the opening load-in still playing. For scroll motion in Firefox, use the GSAP build, index.gsap.html.
Is a CSS scroll animation lighter than GSAP?
Yes, here by about half to two thirds. The 20 native pages download 24 to 53 KB of code gzipped; their GSAP builds need 71 to 98 KB and three to five more requests. Fonts and photos are the same in both builds.
Can I still use GSAP with these templates?
Yes, through the second file: each repository keeps index.gsap.html, the same design on GSAP, ScrollTrigger and Lenis. Pick one file and edit only that one. Do not add GSAP to the native index.html: its scenes are already in CSS, and two engines would fight over the same elements.
Are these CSS scroll animation templates free for client work?
Yes. The code is MIT licensed, so you can use it for your own site or a client's and change anything. Demo photos keep the Unsplash License and the fonts their open font licenses, all listed in each CREDITS.md. The demo text is invented, so replace it before launch.
How does an AI agent change a scroll effect in these files?
By editing CSS. Each scene is keyframes with an animation-range under [data-8b-live], so the agent changes the range or the keyframes. It must keep the gate script and the data-8b-* attributes, and it never needs a library. AGENTS.md in each repository names the parts to keep.
Is there smooth scrolling without Lenis?
Yes. The inline kit eases mouse wheel and trackpad scrolling toward its target, as Lenis did, and leaves touch scrolling native. It runs only where the scroll scenes run, so with reduced motion on or in Firefox scrolling is ordinary.

