Skip to content

176 web animation techniques, each a live demo with plain settings and a ready-made prompt for your AI assistant. No dependencies, no build step.

fix: Cover Card README excerpt keeps the previous frame time

matined686e515e2e
diff --git a/animations/01-scroll-based/cover-card-to-fixed-header/README.md b/animations/01-scroll-based/cover-card-to-fixed-header/README.md
index a16a003d..1c64b87c 100644
--- a/animations/01-scroll-based/cover-card-to-fixed-header/README.md
+++ b/animations/01-scroll-based/cover-card-to-fixed-header/README.md
@@ -57,6 +57,7 @@ the header settles in the same time on a 30, 60 or 120Hz screen:
```js
const dt = last ? Math.min(now - last, 50) : FRAME; // FRAME = 1000 / 60; the first frame after a restart counts as 1/60 s
+last = now;
current += (target - current) * (1 - Math.pow(1 - EASE, dt / FRAME)); // EASE 0.16 is the share covered in 1/60 s
```