EngineeringNovember 30, 20268 min read

Why copied pages lose their animations, and how StyleLift keeps them

Save a beautifully animated page with your browser's "Save page as…", open the copy, and scroll. The headline that used to rise into place is just sitting there. The pictures that drifted at different speeds are still. The section that pinned itself while three cards slid past scrolls away like any other block.

Nothing went wrong with the save. The animations were never in the file.

Where the motion actually lives

HTML describes what's on a page. On a modern site, how things move is decided by scripts while the page runs. A Framer site uses the Motion library; many award winning sites use GSAP and its ScrollTrigger plugin; others write their own code. Every frame, that code reads where you've scrolled, where your pointer is and how much time has passed, then sets new styles: move this up 40 pixels, fade that to 60%, pin this section.

So the page you see is a moment in a running program. A saved copy captures one moment, usually the first, and throws away the program. If the copy keeps the scripts, they often break anyway: they expect the original server, their own build files, or a page structure that no longer matches.

Motion libraries being open source doesn't change this. The library is the engine. The choreography, meaning which element moves, how far, and over which part of the scroll, lives in each site's compiled code.

Watching the page run

StyleLift doesn't try to reverse engineer a site's scripts. It watches what they do. When you capture a page, StyleLift scrolls it at a steady pace, the way a visitor would, and at many points along the way it measures every element that moves: its position, scale, rotation, opacity, size and color.

That gives a recording: for each moving element, a series of measured looks tied to scroll positions. Then each recording is sorted into the kind of motion it is:

Replaying it without the original code

Each kind of motion is rewritten in the simplest code that does the job, mostly plain CSS that every modern browser understands. A scroll effect becomes a CSS animation tied to the page's scroll position:

@keyframes sl-scroll-12 {
  0%   { transform: matrix(1.18, 0, 0, 1.18, 0, 0); }
  100% { transform: none; }
}
[data-sl-scroll="12"] {
  animation: sl-scroll-12 linear both;
  animation-timeline: scroll(root block);
  animation-range: 0px 900px;
}

Those percentages and numbers aren't guessed. They're what the live page measured at those scroll positions. Entrances become timed animations that start when the element appears on screen. Loops become endless CSS animations with the measured speed. For the few things CSS can't do alone, like custom cursors and scripted hovers, the export includes a small script of its own, a few kilobytes, with no dependency on the site's original code.

The result is a page that moves like the original, written in code you can read, edit and keep.

The hard parts

A lot of the work is in details that only show up on real sites:

What still beats us

We'd rather tell you than have you find out. Fully generative effects, like a WebGL scene that responds to your mouse in real time or a fluid simulation, aren't a list of positions. They're programs. StyleLift keeps those as a picture, or on your own site it can keep the live 3D running from the site's own files. And on a few heavily customized sites, our motion match is still well below where we want it. We publish how we measure in a separate post.


Want to see it on a page you're working on? Paste it on our home page. The capture runs in a cloud browser and shows you how many entrances and scroll effects it recorded.

Keep the motion. Lose the rebuild.

Add StyleLift to Chrome and capture your first animated page.