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.
HTML ai-promptsanimationcss-animationsfrontendgithub-pagesjavascriptmicrointeractionsmotion-designno-dependenciesreferencescroll-animationui-animationweb-animationweb-developmentwebgl
feat: the finder's seventeen How pictures, each a small dark square that plays its movement and holds a still with an arrow under reduced motion
matinb91a4d5434e2
diff --git a/index.html b/index.htmlindex ed551d4b..eb4f4e62 100644--- a/index.html+++ b/index.html@@ -1435,6 +1435,128 @@ button,input{font:inherit;color:inherit}.pv-plasmapv .p2{right:-26%;bottom:-32%;background:radial-gradient(circle,#6ea8ff,transparent 65%);animation-delay:-1.8s}.pv-plasmapv .p3{left:28%;bottom:-38%;background:radial-gradient(circle,#b98cff,transparent 65%);animation-delay:-3.6s}@keyframes plsm{from{transform:translate(0,0) scale(1)}to{transform:translate(16%,12%) scale(1.28)}}++/* ── finder pictures ── */+/* "How did it move?": each answer's small dark square (64px) plays its movement on a loop, drawn by up to four <i>; its keyframes+ are named fd-<answer>. With reduced motion every picture holds its resting frame (the styles below, which show the movement at+ a glance) with a small arrow for the way it goes. Shapes use the category colors; only transform and opacity move. */+.fd-pic{position:relative;display:block;width:64px;height:64px;flex:none;border-radius:12px;background:#0b0b0f;box-shadow:inset 0 0 0 1px rgba(255,255,255,.06);overflow:hidden}+.fd-pic i{position:absolute;display:none}+/* Faded or blurred: a square comes out of a blur, holds, and fades away */+.fd-fade i:nth-child(-n+2){display:block;left:18px;top:18px;width:28px;height:28px;border-radius:6px;background:var(--c1)}+.fd-fade i:nth-child(1){filter:blur(5px);opacity:0;animation:fd-fade-blur 3s ease-in-out infinite}+.fd-fade i:nth-child(2){animation:fd-fade 3s ease-in-out infinite}+@keyframes fd-fade{0%,25%{opacity:0}55%,85%{opacity:1}100%{opacity:0}}+@keyframes fd-fade-blur{0%{opacity:0}25%{opacity:.9}55%,100%{opacity:0}}+/* Slid: a square slides in from the left, holds, and slides out to the right */+.fd-slide i:nth-child(1){display:block;left:18px;top:18px;width:28px;height:28px;border-radius:6px;background:var(--c6);animation:fd-slide 2.8s cubic-bezier(.22,1,.36,1) infinite}+@keyframes fd-slide{0%{transform:translateX(-48px)}35%,70%{transform:none}100%{transform:translateX(48px)}}+/* Grew or shrank: a square grows from small, holds, and shrinks away */+.fd-grow i:nth-child(1){display:block;left:16px;top:16px;width:32px;height:32px;border-radius:7px;background:var(--c2);animation:fd-grow 2.8s cubic-bezier(.22,1,.36,1) infinite}+@keyframes fd-grow{0%{transform:scale(.15);opacity:0}12%{opacity:1}45%,70%{transform:none;opacity:1}100%{transform:scale(.15);opacity:0}}+/* Turned or flipped: a card turns over, purple front then light back */+.fd-turn{perspective:160px}+.fd-turn i:nth-child(-n+2){display:block;left:20px;top:14px;width:24px;height:36px;border-radius:5px;backface-visibility:hidden}+.fd-turn i:nth-child(1){background:var(--c3);transform:rotateY(-35deg);animation:fd-turn 3s cubic-bezier(.65,0,.35,1) infinite}+.fd-turn i:nth-child(2){background:#f4f4f2;transform:rotateY(-215deg);animation:fd-turn-back 3s cubic-bezier(.65,0,.35,1) infinite}+@keyframes fd-turn{0%,10%{transform:rotateY(0)}40%,70%{transform:rotateY(180deg)}100%{transform:rotateY(360deg)}}+@keyframes fd-turn-back{0%,10%{transform:rotateY(-180deg)}40%,70%{transform:rotateY(0)}100%{transform:rotateY(180deg)}}+/* Bounced or shook: a ball drops onto a floor and bounces back up */+.fd-bounce i:nth-child(1){display:block;left:26px;top:10px;width:12px;height:12px;border-radius:50%;background:var(--c4);transform:translateY(14px);animation:fd-bounce 1.4s infinite}+.fd-bounce i:nth-child(2){display:block;left:14px;right:14px;bottom:9px;height:2px;border-radius:1px;background:rgba(255,255,255,.35)}+@keyframes fd-bounce{0%,100%{transform:translateY(0);animation-timing-function:cubic-bezier(.5,0,1,.5)}50%{transform:translateY(31px);animation-timing-function:cubic-bezier(0,.5,.5,1)}}+/* One after another: three lines appear in turn */+.fd-stagger i:nth-child(-n+3){display:block;left:14px;height:7px;border-radius:3px;background:#f4f4f2;animation:fd-stagger 2.8s cubic-bezier(.22,1,.36,1) infinite both}+.fd-stagger i:nth-child(1){top:17px;width:30px}+.fd-stagger i:nth-child(2){top:28px;width:24px;opacity:.6;animation-delay:.3s}+.fd-stagger i:nth-child(3){top:39px;width:28px;opacity:.3;animation-delay:.6s}+@keyframes fd-stagger{0%{opacity:0;transform:translateY(7px)}20%,70%{opacity:1;transform:none}85%,100%{opacity:0;transform:none}}+/* Broke into pieces: a square splits into four that fly apart and fade, then it is whole again */+.fd-pieces i{display:block;width:14px;height:14px;background:var(--c5);transform:translate(calc(var(--x) * .35),calc(var(--y) * .35)) rotate(calc(var(--r) * .3));animation:fd-pieces 2.8s cubic-bezier(.22,1,.36,1) infinite}+.fd-pieces i:nth-child(1){left:18px;top:18px;--x:-16px;--y:-16px;--r:-40deg;border-radius:4px 0 0 0}+.fd-pieces i:nth-child(2){left:32px;top:18px;--x:16px;--y:-16px;--r:35deg;border-radius:0 4px 0 0}+.fd-pieces i:nth-child(3){left:18px;top:32px;--x:-16px;--y:16px;--r:30deg;border-radius:0 0 0 4px}+.fd-pieces i:nth-child(4){left:32px;top:32px;--x:16px;--y:16px;--r:-35deg;border-radius:0 0 4px 0}+@keyframes fd-pieces{0%,46%{transform:none;opacity:1}75%{transform:translate(var(--x),var(--y)) rotate(var(--r));opacity:0}76%{transform:none;opacity:0}100%{transform:none;opacity:1}}+/* Followed my pointer: a pointer moves around and a dot trails behind it */+.fd-follow i:nth-child(-n+2){display:block;left:0;top:0;animation:fd-follow 3.2s ease-in-out infinite}+.fd-follow i:nth-child(1){width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:var(--c6);opacity:.85;transform:translate(24px,38px)}+.fd-follow i:nth-child(2){width:13px;height:18px;background:#f4f4f2;clip-path:polygon(0 0,100% 64%,58% 64%,76% 100%,56% 100%,40% 68%,0 88%);transform:translate(36px,26px);animation-delay:-.4s}+@keyframes fd-follow{0%,100%{transform:translate(16px,18px)}33%{transform:translate(28px,46px)}66%{transform:translate(46px,24px)}}+/* Changed color or glowed: a band of colors runs through a rounded bar */+.fd-color i:nth-child(1){display:block;left:10px;top:20px;width:44px;height:24px;border-radius:12px;overflow:hidden;box-shadow:0 0 14px rgba(185,140,255,.45)}+.fd-color i:nth-child(1)::before{content:"";position:absolute;left:-96px;top:0;width:192px;height:100%;background:linear-gradient(90deg,var(--c1),var(--c3),var(--c5),var(--c7),var(--c1)) 0 0/96px 100% repeat-x;animation:fd-color 3s linear infinite}+@keyframes fd-color{to{transform:translateX(96px)}}+/* Changed into something else: a circle turns into a square and back */+.fd-morph i:nth-child(-n+2){display:block;left:18px;top:18px;width:28px;height:28px;background:var(--c7)}+.fd-morph i:nth-child(1){border-radius:50%;animation:fd-morph 3s ease-in-out infinite}+.fd-morph i:nth-child(2){border-radius:5px;opacity:0;animation:fd-morph-square 3s ease-in-out infinite}+@keyframes fd-morph{0%,25%{opacity:1;transform:none}50%,75%{opacity:0;transform:rotate(45deg) scale(.85)}100%{opacity:1;transform:none}}+@keyframes fd-morph-square{0%,25%{opacity:0;transform:rotate(-45deg) scale(.85)}50%,75%{opacity:1;transform:none}100%{opacity:0;transform:rotate(-45deg) scale(.85)}}+/* Drew or typed itself: a line draws itself from left to right behind a pen tip */+.fd-draw i:nth-child(1){display:block;left:10px;top:30px;width:44px;height:4px;border-radius:2px;background:var(--c1);transform-origin:left;transform:scaleX(.65);animation:fd-draw 2.6s ease-in-out infinite}+.fd-draw i:nth-child(2){display:block;left:7px;top:27px;width:10px;height:10px;border-radius:50%;background:#f4f4f2;transform:translateX(29px);animation:fd-draw-pen 2.6s ease-in-out infinite}+@keyframes fd-draw{0%{transform:scaleX(0)}60%,85%{transform:none;opacity:1}100%{transform:none;opacity:0}}+@keyframes fd-draw-pen{0%{transform:translateX(0)}60%,85%{transform:translateX(44px);opacity:1}100%{transform:translateX(44px);opacity:0}}+/* Got uncovered: a colored panel slides off a little landscape, then covers it again */+.fd-reveal i:nth-child(1){display:block;inset:0;background:linear-gradient(#9fb8ff,#dfe7ff)}+.fd-reveal i:nth-child(2){display:block;right:12px;top:12px;width:10px;height:10px;border-radius:50%;background:#ffb020}+.fd-reveal i:nth-child(3){display:block;left:-12px;right:-12px;bottom:-30px;height:52px;border-radius:50%;background:#2b9a4a}+.fd-reveal i:nth-child(4){display:block;inset:0;background:var(--c5);transform:translateX(55%);animation:fd-reveal 2.8s cubic-bezier(.65,0,.35,1) infinite}+@keyframes fd-reveal{0%,10%{transform:none}45%,85%{transform:translateX(100%)}100%{transform:none}}+/* Moved in layers: three bands of dashes slide sideways, the near ones faster (each moves one dash pattern per loop) */+.fd-layers i:nth-child(-n+3){display:block;left:-64px;width:128px;border-radius:2px;animation:fd-layers 2.4s linear infinite}+.fd-layers i:nth-child(1){top:14px;height:6px;background:repeating-linear-gradient(90deg,rgba(110,168,255,.55) 0 8px,transparent 8px 16px);--d:16px}+.fd-layers i:nth-child(2){top:28px;height:8px;background:repeating-linear-gradient(90deg,rgba(185,140,255,.8) 0 16px,transparent 16px 32px);--d:32px}+.fd-layers i:nth-child(3){top:44px;height:10px;background:repeating-linear-gradient(90deg,var(--c6) 0 32px,transparent 32px 64px);--d:64px}+@keyframes fd-layers{to{transform:translateX(var(--d))}}+/* Stayed in place while I scrolled: lines pass upward behind a box that holds still */+.fd-pin i:nth-child(1){display:block;left:10px;right:10px;top:0;height:128px;background:repeating-linear-gradient(180deg,rgba(255,255,255,.3) 0 3px,transparent 3px 14px);animation:fd-pin 1.4s linear infinite}+.fd-pin i:nth-child(2){display:block;left:18px;top:22px;width:28px;height:20px;border-radius:4px;background:var(--c7);box-shadow:0 0 0 4px #0b0b0f}+@keyframes fd-pin{to{transform:translateY(-14px)}}+/* Drifted or floated: four dots drift slowly, each on its own path */+.fd-drift i{display:block;width:8px;height:8px;border-radius:50%;background:#f4f4f2;animation:fd-drift 3.6s ease-in-out infinite alternate}+.fd-drift i:nth-child(1){left:12px;top:14px;--dx:10px;--dy:6px}+.fd-drift i:nth-child(2){left:40px;top:10px;width:6px;height:6px;opacity:.7;--dx:-8px;--dy:10px;animation-duration:4.2s}+.fd-drift i:nth-child(3){left:22px;top:40px;width:6px;height:6px;opacity:.6;--dx:8px;--dy:-8px;animation-duration:4.8s}+.fd-drift i:nth-child(4){left:46px;top:42px;--dx:-10px;--dy:-6px;animation-duration:3.9s}+@keyframes fd-drift{to{transform:translate(var(--dx),var(--dy))}}+/* Rippled or waved: rings spread from the middle, one after another */+.fd-wave i:nth-child(-n+3){display:block;left:12px;top:12px;width:40px;height:40px;border-radius:50%;border:2px solid var(--c6);animation:fd-wave 2.4s ease-out infinite}+.fd-wave i:nth-child(1){transform:scale(.35)}+.fd-wave i:nth-child(2){transform:scale(.7);opacity:.6;animation-delay:-.8s}+.fd-wave i:nth-child(3){transform:scale(1.05);opacity:.3;animation-delay:-1.6s}+@keyframes fd-wave{0%{transform:scale(.2);opacity:1}100%{transform:scale(1.4);opacity:0}}+/* Glitched or flickered: a bar jumps while red and blue copies of it jitter beside it */+.fd-glitch i:nth-child(-n+3){display:block;left:14px;top:26px;width:36px;height:12px;border-radius:2px}+.fd-glitch i:nth-child(1){background:#ff3b5c;opacity:.85;transform:translateX(-2px);animation:fd-glitch-red 1.6s steps(1) infinite}+.fd-glitch i:nth-child(2){background:#2fd8ff;opacity:.85;transform:translateX(2px);animation:fd-glitch-blue 1.6s steps(1) infinite}+.fd-glitch i:nth-child(3){background:#f4f4f2;animation:fd-glitch 1.6s steps(1) infinite}+@keyframes fd-glitch{0%,100%{transform:none}30%{transform:translateX(3px)}34%{transform:translateX(-2px) scaleY(.7)}38%,82%{transform:none}86%{transform:translateX(-3px)}90%{transform:none}}+@keyframes fd-glitch-red{0%,100%{transform:translateX(-2px)}30%{transform:translateX(-6px)}38%{transform:translateX(-2px)}86%{transform:translateX(4px)}90%{transform:translateX(-2px)}}+@keyframes fd-glitch-blue{0%,100%{transform:translateX(2px)}30%{transform:translateX(6px)}38%{transform:translateX(2px)}86%{transform:translateX(-4px)}90%{transform:translateX(2px)}}+@media(prefers-reduced-motion:reduce){+ .fd-pic *,.fd-pic *::before,.fd-pic *::after{animation:none!important}+ /* still frames where the resting styles above do not show the movement: the blur beside the sharp square, the circle beside+ the square, the square still growing */+ .fd-fade i:nth-child(1){opacity:.8;transform:translateX(-16px) scale(.6)}+ .fd-fade i:nth-child(2){transform:translateX(16px) scale(.6)}+ .fd-morph i:nth-child(1){transform:translateX(-16px) scale(.6)}+ .fd-morph i:nth-child(2){opacity:1;transform:translateX(16px) scale(.6)}+ .fd-grow i:nth-child(1){transform:scale(.7)}+ /* the small arrow: which way it moves (a curved one for turning, a double one for glitching) */+ .fd-pic::after{content:"";position:absolute;left:var(--ax,44px);top:var(--ay,4px);width:var(--as,16px);height:var(--as,16px);transform:rotate(var(--ar,0deg));background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f4f4f2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E") center/contain no-repeat}+ .fd-fade,.fd-morph{--ax:25px;--ay:25px;--as:14px}+ .fd-slide,.fd-reveal{--ax:47px;--ay:24px}+ .fd-grow,.fd-pieces,.fd-wave{--ax:49px;--ay:1px;--as:14px;--ar:-45deg}+ .fd-bounce,.fd-stagger{--ax:46px;--ay:24px;--ar:90deg}+ .fd-follow{--ax:4px;--ay:44px;--ar:-40deg}+ .fd-color,.fd-draw,.fd-layers,.fd-glitch{--ax:26px;--ay:49px}+ .fd-pin{--ax:48px;--ay:44px;--ar:-90deg}+ .fd-drift{--ax:24px;--ay:24px;--ar:-30deg}+ .fd-turn::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f4f4f2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12a8 8 0 1 1-2.3-5.7M20 4v5h-5'/%3E%3C/svg%3E")}+ .fd-glitch::after{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f4f4f2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h18M7 8l-4 4 4 4M17 8l4 4-4 4'/%3E%3C/svg%3E")}+}</style></head><body>diff --git a/tests/finder.test.js b/tests/finder.test.jsindex a1de9e66..3aa237eb 100644--- a/tests/finder.test.js+++ b/tests/finder.test.js@@ -174,6 +174,26 @@ test('the Not here? address opens the form animation_not_here.yml with its title// ── The pictures of the How answers ──// Each How answer moves in a small picture of its own, and reduced motion holds every picture still.+const STYLE = [...HOME.matchAll(/<style>([\s\S]*?)<\/style>/g)].map(m => m[1]).join('\n');++test('every How answer has a moving picture, its keyframes are named fd- and move only transform and opacity, and no keyframes name is used twice', () => {+ const names = [...STYLE.matchAll(/@keyframes\s+([\w-]+)/g)].map(m => m[1]);+ assert.deepEqual(names.filter((name, i) => names.indexOf(name) !== i), [], 'no @keyframes name twice in index.html');+ for (const a of homeConst('FIND_Q')[2].answers) {+ assert.match(STYLE, new RegExp(`\\.${a.pic}[\\s.:{,]`), `a rule draws ${a.pic}`);+ assert.ok(names.some(name => name === a.pic || name.startsWith(a.pic + '-')), `${a.pic} moves: @keyframes ${a.pic}`);+ }+ for (const [, name, body] of STYLE.matchAll(/@keyframes\s+(fd-[\w-]+)\s*\{((?:[^{}]*\{[^{}]*\})*)\s*\}/g)) {+ for (const [, property] of body.matchAll(/([a-z-]+)\s*:/g)) {+ assert.ok(['transform', 'opacity', 'animation-timing-function'].includes(property), `${name} animates ${property}`);+ }+ }+});++test('with reduced motion the How pictures hold still', () => {+ assert.match(STYLE, /@media\(prefers-reduced-motion:reduce\)\{\s*\.fd-pic \*,\.fd-pic \*::before,\.fd-pic \*::after\{animation:none!important\}/);+});+// ── The finder view, its ways in and Not here? ──// The finder's markup and address, the Find button and the Finder link, and the Not here? panel with its GitHub form.