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.

feat: the headset card draws the visor of its version, and every entry has a What you see heading

matin794f046385f7
diff --git a/famous/index.html b/famous/index.html
index a54ca3e2..af8fd559 100644
--- a/famous/index.html
+++ b/famous/index.html
@@ -229,15 +229,26 @@ button{font:inherit;color:inherit}
.gp-ribbon .rs4{top:62cqh;transform:rotate(4deg);background:linear-gradient(90deg,transparent,#fff 35%,var(--c5) 75%,transparent)}
.gp-ribbon .rs5{top:70cqh;transform:rotate(8deg);background:linear-gradient(90deg,transparent,#fff 35%,var(--c3) 75%,transparent)}
-/* the headset: a visor of our own layers that rises apart one by one, tips back and comes together */
+/* the headset: the finished visor drawn as four plates (glass, frame ring, lenses, coral band ring). At rest they are taken apart and
+ seen at a tilt, glass on top; the loop puts them together, tips the visor up to show the lens rings and comes round again. */
.gp-visor{background:radial-gradient(70% 90% at 50% 55%,#111631,#08080a 72%);perspective:90cqw}
-.vz{position:absolute;left:22cqw;top:17.5cqw;width:56cqw;height:28cqw;transform-origin:50% 100%}
-.v-band{left:-9cqw;right:-9cqw;top:8cqw;bottom:8cqw;border-radius:999px;background:linear-gradient(90deg,var(--c5),var(--c4) 50%,var(--c5));opacity:.92;--lift:0cqw}
-.v-frame{inset:0;border-radius:9cqw;border:1.1cqw solid var(--c3);box-shadow:0 0 4cqw rgba(185,140,255,.4);--lift:-4.5cqw}
-.v-glass{left:5cqw;right:5cqw;top:3cqw;bottom:3cqw;border-radius:7cqw;background:linear-gradient(110deg,var(--c1),var(--c6));opacity:.88;--lift:-9.5cqw}
-.v-lens{top:8.5cqw;width:11cqw;height:11cqw;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff,#d4e4ff 16%,#6a8fe8 46%,#121b3a);box-shadow:0 0 0 .5cqw rgba(255,255,255,.4);--lift:-15cqw}
-.v-lens.l1{left:11cqw}
-.v-lens.l2{right:11cqw}
+.vz{--u:4.2cqw;position:absolute;left:calc(50cqw - var(--u) * 5);top:calc(35cqw - var(--u) * 2.275);width:calc(var(--u) * 10);height:calc(var(--u) * 4.55);transform-style:preserve-3d;transform:rotateX(64deg) rotateY(-16deg)}
+.vz>i{transform:translateZ(calc(var(--u) * var(--z1)))}
+.v-glass{inset:0;border-radius:34% / 50%;overflow:hidden;--z0:.12;--z1:4.5;background:linear-gradient(180deg,rgba(255,255,255,.22),transparent 48%),linear-gradient(135deg,rgba(110,168,255,.66),rgba(63,214,196,.5));box-shadow:inset 0 0 0 calc(var(--u) * .07) rgba(255,255,255,.6),inset 0 calc(var(--u) * -.6) calc(var(--u) * 1.2) rgba(63,214,196,.3)}
+.v-glass::before,.v-glass::after{content:"";position:absolute;top:-12%;bottom:-12%;transform:skewX(-24deg);background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent)}
+.v-glass::before{left:15%;width:13%}
+.v-glass::after{left:33%;width:3.5%}
+.v-frame,.v-band{border:solid transparent;-webkit-mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) padding-box,linear-gradient(#000 0 0);mask-composite:exclude}
+.v-frame{inset:calc(var(--u) * -.28);border-width:calc(var(--u) * .5);border-radius:34% / 50%;--z0:.08;--z1:1.5;background:linear-gradient(135deg,#e2d2ff,var(--c3) 45%,#7d57dd) border-box}
+.v-band{inset:calc(var(--u) * -.28) calc(var(--u) * -1.15);border-width:calc(var(--u) * .4);border-radius:99em;--z0:0;--z1:-4.5;background:linear-gradient(90deg,var(--c5),var(--c4) 50%,var(--c5)) border-box}
+.v-lens{inset:0;transform-style:preserve-3d;--z0:.04;--z1:-1.5}
+.v-lens span{position:absolute;inset:0;backface-visibility:hidden}
+.v-lens .fb{transform:rotateY(180deg)}
+.v-lens span i{top:50%;width:calc(var(--u) * 2.4);aspect-ratio:1;margin:calc(var(--u) * -1.2) 0 0 calc(var(--u) * -1.2);border-radius:50%}
+.v-lens span i:first-child{left:28%}
+.v-lens span i:last-child{left:72%}
+.v-lens .fa i{background:radial-gradient(circle at 36% 30%,#4b5c93,#10142a 62%);box-shadow:inset 0 0 0 calc(var(--u) * .08) rgba(63,214,196,.6)}
+.v-lens .fb i{background:radial-gradient(circle closest-side,#fff 0 20%,#0e1226 20% 38%,var(--c3) 38% 50%,#0e1226 50% 63%,var(--c1) 63% 75%,#0e1226 75% 88%,var(--c6) 88%)}
/* the liquid reveal: a soft round window onto a second picture; the second picture is moved the other way, so it stays put */
.gp-reveal{background:#0a0c14}
@@ -366,8 +377,8 @@ button{font:inherit;color:inherit}
@keyframes g-rib{from{transform:rotate(-16deg) translateY(-30%) scaleY(.5)}to{transform:rotate(10deg) translateY(30%) scaleY(1.3)}}
@keyframes g-rs{from{transform:rotate(-14deg) translateY(-12cqh) scaleX(.92)}to{transform:rotate(11deg) translateY(12cqh) scaleX(1.06)}}
-@keyframes g-lift{0%,12%{transform:none}30%,78%{transform:translateY(var(--lift))}94%,100%{transform:none}}
-@keyframes g-tip{0%,42%{transform:rotateX(0)}58%,68%{transform:rotateX(38deg)}82%,100%{transform:rotateX(0)}}
+@keyframes g-lift{0%,6%{transform:translateZ(calc(var(--u) * var(--z0)))}24%,52%{transform:translateZ(calc(var(--u) * var(--z1)))}70%,100%{transform:translateZ(calc(var(--u) * var(--z0)))}}
+@keyframes g-tip{0%,6%{transform:rotateX(8deg) rotateY(12deg)}26%,52%{transform:rotateX(64deg) rotateY(-16deg)}70%,76%{transform:rotateX(8deg) rotateY(12deg)}88%,95%{transform:rotateX(188deg) rotateY(12deg)}100%{transform:rotateX(368deg) rotateY(12deg)}}
@keyframes g-blob{0%,100%{transform:translate(14cqw,14cqh)}25%{transform:translate(48cqw,8cqh)}50%{transform:translate(52cqw,30cqh)}75%{transform:translate(22cqw,32cqh)}}
@keyframes g-blob-i{0%,100%{transform:translate(-14cqw,-14cqh)}25%{transform:translate(-48cqw,-8cqh)}50%{transform:translate(-52cqw,-30cqh)}75%{transform:translate(-22cqw,-32cqh)}}
@keyframes g-line{0%,6%{opacity:0;transform:translateY(5cqh)}24%,80%{opacity:1;transform:none}92%,100%{opacity:0;transform:translateY(-2cqh)}}
@@ -397,12 +408,12 @@ button{font:inherit;color:inherit}
.gp-ribbon .rs3{animation-duration:13s;animation-delay:-7s}
.gp-ribbon .rs4{animation-duration:10s;animation-delay:-2s}
.gp-ribbon .rs5{animation-duration:12s;animation-delay:-5s}
- .gp-visor{--x:3.5s}
+ .gp-visor{--x:3.4s}
.gp-visor .vz{animation:g-tip 9s ease-in-out infinite backwards;animation-delay:calc(0s - var(--x))}
- .gp-visor .vz i{animation:g-lift 9s ease-in-out infinite backwards;animation-delay:calc(var(--d,0s) - var(--x))}
- .gp-visor .vz .v-frame{--d:.22s}
- .gp-visor .vz .v-glass{--d:.44s}
- .gp-visor .vz .v-lens{--d:.66s}
+ .gp-visor .vz>i{animation:g-lift 9s ease-in-out infinite backwards;animation-delay:calc(var(--d,0s) - var(--x))}
+ .gp-visor .vz>.v-frame{--d:.14s}
+ .gp-visor .vz>.v-lens{--d:.28s}
+ .gp-visor .vz>.v-band{--d:.42s}
.rv-blob{animation:g-blob 9s ease-in-out infinite backwards}
.rv-b{animation:g-blob-i 9s ease-in-out infinite backwards}
.gp-intro{--x:2.6s}
@@ -696,7 +707,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
</li>
<li class="tile" data-fx-tile="apple-scroll">
<div class="t-stage">
- <div class="gp gp-visor" aria-hidden="true"><div class="vz"><i class="v-band"></i><i class="v-frame"></i><i class="v-glass"></i><i class="v-lens l1"></i><i class="v-lens l2"></i></div></div>
+ <div class="gp gp-visor" aria-hidden="true"><div class="vz"><i class="v-band"></i><i class="v-lens"><span class="fa"><i></i><i></i></span><span class="fb"><i></i><i></i></span></i><i class="v-frame"></i><i class="v-glass"></i></div></div>
<div class="t-tags"><span class="t-tag">Our version</span><span class="t-tag t-start">On scroll</span></div>
</div>
<div class="t-meta">
@@ -818,6 +829,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<p class="fx-seen">Seen on <a href="https://stripe.com/" target="_blank" rel="noopener">stripe.com<span class="sr"> (opens in a new tab)</span></a> in&nbsp;<time datetime="2026-10-13">2026</time></p>
<h2 id="stripe-ribbon-t" tabindex="-1">The twisting ribbon of light</h2>
<p class="fx-chips"><span class="fx-chip">Loops</span><span class="fx-chip">Made from 3 animations</span></p>
+ <h3 class="fx-sub">What you see</h3>
<p class="fx-what">Behind the headline, a wide ribbon made of fine strands of glowing color slowly twists in depth, some strands sharp and others soft, as if filmed by a camera, under a fine grain. Before 2026 the same place held a flat band of blended colors that flowed like slow paint, the look <a href="../animations/07-ambient-background/mesh-gradient/">Mesh Gradient Animation</a> makes.</p>
<h3 class="fx-sub">Good to know</h3>
<dl class="fx-know">
@@ -852,6 +864,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<p class="fx-phint">Built from the prompt below. Scroll inside the box, or press Play.</p>
</div>
</div>
+ <h3 class="fx-sub">What you see</h3>
<p class="fx-what">About two thirds of the way down the page, the headset stays in the middle of the screen while you scroll: its parts rise out of it layer by layer, then it tips up to show its lenses, and scrolling back puts it together.</p>
<h3 class="fx-sub">Good to know</h3>
<dl class="fx-know">
@@ -874,6 +887,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<p class="fx-seen">Seen on <a href="https://landonorris.com/" target="_blank" rel="noopener">landonorris.com<span class="sr"> (opens in a new tab)</span></a> in&nbsp;<time datetime="2026-10-13">2026</time></p>
<h2 id="landonorris-reveal-t" tabindex="-1">The liquid reveal under the pointer</h2>
<p class="fx-chips"><span class="fx-chip">Starts on hover</span><span class="fx-chip">Made from 3 animations</span></p>
+ <h3 class="fx-sub">What you see</h3>
<p class="fx-what">A large portrait stands in the middle of the screen. Wherever the pointer moves across his head, a soft, liquid-looking blob shows a second picture through it, his racing helmet, as if the portrait were being wiped away.</p>
<h3 class="fx-sub">Good to know</h3>
<dl class="fx-know">
@@ -897,6 +911,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<p class="fx-seen">Seen on <a href="https://linear.app/" target="_blank" rel="noopener">linear.app<span class="sr"> (opens in a new tab)</span></a> in&nbsp;<time datetime="2026-10-13">2026</time></p>
<h2 id="linear-intro-t" tabindex="-1">The headline that comes into focus</h2>
<p class="fx-chips"><span class="fx-chip">Starts on load</span><span class="fx-chip">Made from 3 animations</span></p>
+ <h3 class="fx-sub">What you see</h3>
<p class="fx-what">As the page opens, the headline comes in line by line, each line fading in while it rises a little and sharpens out of a soft blur; the short line under it and a small link follow the same way, then a large flat picture of the app fades in below.</p>
<h3 class="fx-sub">Good to know</h3>
<dl class="fx-know">
@@ -920,6 +935,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<p class="fx-seen">Seen on <a href="https://www.apple.com/" target="_blank" rel="noopener">apple.com<span class="sr"> (opens in a new tab)</span></a> in&nbsp;<time datetime="2026-10-13">2026</time></p>
<h2 id="apple-menu-t" tabindex="-1">The menu that drops in, link by link</h2>
<p class="fx-chips"><span class="fx-chip">Starts on press</span><span class="fx-chip">Made from 3 animations</span></p>
+ <h3 class="fx-sub">What you see</h3>
<p class="fx-what">On a phone, the two-line menu button folds into an X while the menu fills the screen and its links drop into place one after another. On a computer, pointing at a top item opens a panel that grows down from the bar, its links appearing in turn, while the page behind blurs.</p>
<h3 class="fx-sub">Good to know</h3>
<dl class="fx-know">
@@ -943,6 +959,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<p class="fx-seen">Seen on <a href="https://en.wikipedia.org/wiki/Animation" target="_blank" rel="noopener">en.wikipedia.org/wiki/Animation<span class="sr"> (opens in a new tab)</span></a> in&nbsp;<time datetime="2026-10-13">2026</time></p>
<h2 id="wikipedia-previews-t" tabindex="-1">Link previews</h2>
<p class="fx-chips"><span class="fx-chip">Starts on hover</span><span class="fx-chip">Made from 2 animations</span></p>
+ <h3 class="fx-sub">What you see</h3>
<p class="fx-what">On any article, rest the pointer on a link and, after a short pause, a small card with the linked article's first lines and picture fades in under the link, rising slightly into place; move away and it fades out.</p>
<h3 class="fx-sub">Good to know</h3>
<dl class="fx-know">
@@ -965,6 +982,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<p class="fx-seen">Seen on <a href="https://www.apple.com/iphone-18-pro/" target="_blank" rel="noopener">apple.com/iphone-18-pro<span class="sr"> (opens in a new tab)</span></a> in&nbsp;<time datetime="2026-10-13">2026</time></p>
<h2 id="apple-sweep-t" tabindex="-1">The color that sweeps across the headline</h2>
<p class="fx-chips"><span class="fx-chip">Starts on scroll</span><span class="fx-chip">Made from 1 animation</span></p>
+ <h3 class="fx-sub">What you see</h3>
<p class="fx-what">Far down the page, as the large headline of the section about the chip comes into view, a band of bright color sweeps across its letters once, from one end to the other, and the words settle into their plain color, as if a light had passed over them.</p>
<h3 class="fx-sub">Good to know</h3>
<dl class="fx-know">
@@ -986,6 +1004,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<p class="fx-seen">Seen on <a href="https://open.spotify.com/" target="_blank" rel="noopener">open.spotify.com<span class="sr"> (opens in a new tab)</span></a> in&nbsp;<time datetime="2026-10-13">2026</time></p>
<h2 id="spotify-cards-t" tabindex="-1">The play button that rises</h2>
<p class="fx-chips"><span class="fx-chip">Starts on hover</span><span class="fx-chip">Made from 2 animations</span></p>
+ <h3 class="fx-sub">What you see</h3>
<p class="fx-what">Point at an album or playlist card and the card lightens a shade while a round green play button fades in, rising a few pixels into the cover's bottom corner.</p>
<h3 class="fx-sub">Good to know</h3>
<dl class="fx-know">
@@ -1008,6 +1027,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<p class="fx-seen">Seen on <a href="https://www.youtube.com/" target="_blank" rel="noopener">youtube.com<span class="sr"> (opens in a new tab)</span></a> in&nbsp;<time datetime="2026-10-13">2026</time></p>
<h2 id="youtube-loading-t" tabindex="-1">Gray shapes while it loads</h2>
<p class="fx-chips"><span class="fx-chip">Starts on load</span><span class="fx-chip">Made from 1 animation</span></p>
+ <h3 class="fx-sub">What you see</h3>
<p class="fx-what">Before the videos appear, gray boxes and bars in the shapes of thumbnails, round channel pictures and titles fill the page; then the real content takes their places.</p>
<h3 class="fx-sub">Good to know</h3>
<dl class="fx-know">
@@ -1029,6 +1049,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<p class="fx-seen">Seen on <a href="https://pudding.cool/2025/11/democracy/" target="_blank" rel="noopener">pudding.cool/2025/11/democracy<span class="sr"> (opens in a new tab)</span></a> in&nbsp;<time datetime="2026-10-13">2026</time></p>
<h2 id="pudding-chart-t" tabindex="-1">The chart that changes as you read</h2>
<p class="fx-chips"><span class="fx-chip">Starts on scroll</span><span class="fx-chip">Made from 2 animations</span></p>
+ <h3 class="fx-sub">What you see</h3>
<p class="fx-what">A chart of dots stays on screen while short paragraphs scroll past. As you scroll, the years go by and each year's dots pile up into the chart, the ones the story is about in bright color, and at some paragraphs the dots slide into a new chart; scrolling back undoes each step.</p>
<h3 class="fx-sub">Good to know</h3>
<dl class="fx-know">
@@ -1051,6 +1072,7 @@ html.fx-open{overflow:hidden;padding-right:var(--fx-gap,0px)} /* the page does n
<p class="fx-seen">Seen on <a href="https://medium.com/" target="_blank" rel="noopener">medium.com<span class="sr"> (opens in a new tab)</span></a> in&nbsp;<time datetime="2026-10-13">2026</time></p>
<h2 id="medium-top-bar-t" tabindex="-1">The top bar that hides while you read</h2>
<p class="fx-chips"><span class="fx-chip">Starts on scroll</span><span class="fx-chip">Made from 1 animation</span></p>
+ <h3 class="fx-sub">What you see</h3>
<p class="fx-what">On a phone, scroll down into an article and the top bar moves up out of the way with the text; scroll up a little and it comes back down.</p>
<h3 class="fx-sub">Good to know</h3>
<dl class="fx-know">
diff --git a/tests/famous.test.js b/tests/famous.test.js
index 58cf19e0..f3ba27d6 100644
--- a/tests/famous.test.js
+++ b/tests/famous.test.js
@@ -418,9 +418,9 @@ const stems = s => new Set((s.toLowerCase().match(/[a-z]{5,}/g) || []).map(w =>
// The player of each kind of entry: its buttons as [data-fx-cmd, label]. A loop's one button swaps between Pause and Play.
const PLAYER = { loop: [['pause', 'Pause']], load: [['replay', 'Replay']], hover: [['show', 'Show me']], press: [['show', 'Show me']], scroll: [['play', 'Play'], ['top', 'Back to top']] };
for (const e of ENTRIES) {
- test(`${e.id}: its parts come in the template's order, with its chips, Good to know and the link to the real page`, () => {
+ test(`${e.id}: its parts come in the template's order, with its chips, What you see, Good to know and the link to the real page`, () => {
const b = e.body, hasVersion = b.includes('<div class="fx-version">');
- const order = ['<p class="fx-seen">', '<h2 ', '<p class="fx-chips">', hasVersion && '<div class="fx-version">', '<p class="fx-what">', '<h3 class="fx-sub">Good to know</h3>', '<dl class="fx-know">',
+ const order = ['<p class="fx-seen">', '<h2 ', '<p class="fx-chips">', hasVersion && '<div class="fx-version">', '<h3 class="fx-sub">What you see</h3>', '<p class="fx-what">', '<h3 class="fx-sub">Good to know</h3>', '<dl class="fx-know">',
'<h3 class="fx-sub">Build it with these animations</h3>', '<div class="fx-cards">', '<h3 class="fx-sub">A prompt to build something similar</h3>', '<div class="fx-pbox">', '<button type="button" class="copy"', '<a class="fx-real"'].filter(Boolean);
let last = -1;
for (const part of order) {
@@ -429,6 +429,7 @@ for (const e of ENTRIES) {
assert.equal(count(b, part), 1, `${part} is there once`);
last = at;
}
+ assert.ok(b.includes('<h3 class="fx-sub">What you see</h3>\n <p class="fx-what">'), 'What you see is the heading right before what you see');
const chips = b.match(/<p class="fx-chips"><span class="fx-chip">([^<]+)<\/span><span class="fx-chip">([^<]+)<\/span><\/p>/);
assert.ok(chips, 'two chips');
assert.equal(chips[1], START_CHIPS[e.start], 'what starts it');