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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
<title>Our version: The headline that comes into focus</title>
<style>
@font-face{font-family:'Schibsted Grotesk';src:url('../../assets/fonts/schibsted-latin-ext.woff2') format('woff2');font-weight:400 900;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Schibsted Grotesk';src:url('../../assets/fonts/schibsted-latin.woff2') format('woff2');font-weight:400 900;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
:root{--c1:#6ea8ff;--c2:#5fd88a;--c3:#b98cff;--c4:#ff9d5c;--c5:#ff6f8b;--c6:#3fd6c4;--c7:#ffce5a;color-scheme:dark}
html.lite{--bs:.4}
*{box-sizing:border-box;margin:0}
html{background:#0b0b0f;overflow:hidden;scrollbar-width:thin;scrollbar-color:#3c3c4a #0b0b0f}
body{color:#f4f4f2;font:400 15px/1.5 'Schibsted Grotesk',system-ui,-apple-system,'Segoe UI',sans-serif;-webkit-font-smoothing:antialiased}
.hero{display:flex;flex-direction:column;align-items:center;height:100vh;height:100svh;padding:clamp(44px,12vh,92px) clamp(16px,5vw,48px) 0;text-align:center;overflow:hidden;background:radial-gradient(90% 60% at 50% 0,rgba(110,168,255,.1),transparent 70%)}
h1{font-size:clamp(22px,min(9.5vw,9.4vh),60px);line-height:1.08;font-weight:650;letter-spacing:-.025em}
.ln{display:block}
.sub{max-width:30em;margin-top:clamp(8px,1.8vh,16px);font-size:clamp(13px,min(3.6vw,3.6vh),18px);line-height:1.45;color:#b9bccd;text-wrap:balance}
.cta{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin-top:clamp(12px,3vh,26px)}
.btn{min-width:44px;min-height:44px;padding:0 clamp(14px,4vw,20px);border-radius:99px;border:1.5px solid rgba(255,255,255,.32);background:none;color:#f4f4f2;font:600 clamp(14px,2vh,16px) 'Schibsted Grotesk',system-ui,sans-serif;cursor:pointer;transition:transform .15s}
.btn.p{border-color:var(--c1);background:var(--c1);color:#0b0b0f}
.btn:active{transform:scale(.97)}
.btn:focus-visible{outline:3px solid #fff;outline-offset:3px}
/* Every part comes in the same way: it fades up from transparent while it rises a little and sharpens out of a soft blur. Only the delay, the length, the rise and the blur differ. */
.a{--d:0s;--t:1.2s;--y:.34em;--b:calc(.2em * var(--bs, 1))}
.ln+.ln{--d:.09s}
.sub{--d:.2s;--t:1.35s;--y:.7em;--b:calc(.5em * var(--bs, 1))}
.cta{--d:.45s;--t:1.5s;--y:7px;--b:calc(6px * var(--bs, 1))}
.sw{--d:.9s;--t:2.2s;--y:0px;--b:calc(8px * var(--bs, 1))}
.lite .sw{--b:0px}
.pre .a{opacity:0;transform:translateY(var(--y));filter:blur(var(--b))}
.on .a{animation:rise var(--t) cubic-bezier(.3,.8,.35,1) var(--d) backwards}
@keyframes rise{from{opacity:0;transform:translateY(var(--y));filter:blur(var(--b))}}
/* the app window: shapes only, cropped by the bottom of the box and faded out there */
.sw{position:relative;isolation:isolate;flex:1 1 0;min-height:0;width:100%;max-width:780px;margin-top:clamp(14px,3.6vh,38px)}
.sw::before{content:"";position:absolute;z-index:-1;left:-6%;right:-6%;top:-60px;height:240px;background:radial-gradient(closest-side,rgba(110,168,255,.3),rgba(185,140,255,.16) 58%,transparent)}
.lite .sw::before{display:none}
.win{position:absolute;inset:0;overflow:hidden;text-align:left;border:1px solid rgba(255,255,255,.12);border-bottom:0;border-radius:14px 14px 0 0;background:linear-gradient(#181823,#101018);-webkit-mask-image:linear-gradient(#000 calc(100% - min(70px,40%)),transparent);mask-image:linear-gradient(#000 calc(100% - min(70px,40%)),transparent)}
.wb{display:flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-bottom:1px solid rgba(255,255,255,.07)}
.wb i{width:8px;height:8px;border-radius:50%;background:var(--c5)}
.wb i:nth-child(2){background:var(--c7)}
.wb i:nth-child(3){background:var(--c2)}
.wb b{margin:0 auto;width:30%;height:10px;border-radius:5px;background:rgba(255,255,255,.09)}
.wm{display:grid;grid-template-columns:minmax(64px,24%) 1fr}
.ws,.wp{display:grid;align-content:start;gap:10px}
.ws{padding:14px 12px;border-right:1px solid rgba(255,255,255,.07)}
.ws i,.wp b{display:block;width:var(--w);height:10px;border-radius:5px;background:rgba(255,255,255,.13)}
.ws i:first-child{background:rgba(110,168,255,.4)}
.wp{padding:16px clamp(12px,3vw,26px)}
.wp b{height:8px;background:rgba(255,255,255,.17)}
.wp b.h{height:14px;border-radius:7px;background:#e9ebf3}
.cd{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:6px}
.cd span{height:clamp(44px,9vh,76px);border-radius:10px;border:1px solid rgba(255,255,255,.09);background:linear-gradient(145deg,rgba(var(--k),.34),rgba(255,255,255,.03) 70%)}
.ch{display:flex;align-items:flex-end;gap:6px;height:clamp(50px,10vh,90px);margin-top:6px}
.ch i{flex:1;height:var(--h);border-radius:4px 4px 0 0;background:linear-gradient(var(--c1),var(--c3));opacity:.75}
@media (prefers-reduced-motion: reduce){.pre .a{transform:none;filter:none}.on .a{animation:none}}
</style>
<script>
{
const q = '(max-width:600px),(max-height:500px)', cl = document.documentElement.classList;
let lite;
try { lite = window.parent.matchMedia(q).matches; } catch (e) { lite = screen.width <= 600 || screen.height <= 500; }
cl.toggle('lite', lite);
if (!matchMedia('(prefers-reduced-motion: reduce)').matches) cl.add('pre'); // hidden and ready: the arrival plays it
}
</script>
</head>
<body>
<main class="hero">
<h1><span class="a ln">Your headline</span><span class="a ln">comes into focus</span></h1>
<p class="a sub">Then the rest follows, in turn.</p>
<div class="a cta"><button type="button" class="btn p">Get started</button><button type="button" class="btn">Learn more</button></div>
<div class="a sw"><div class="win" role="img" aria-label="An abstract app window: a column of rows beside a page with a heading, three lines of text, three cards and a chart of bars.">
<div class="wb"><i></i><i></i><i></i><b></b></div>
<div class="wm">
<div class="ws"><i style="--w:72%"></i><i style="--w:54%"></i><i style="--w:80%"></i><i style="--w:46%"></i><i style="--w:64%"></i></div>
<div class="wp"><b class="h" style="--w:38%"></b><b style="--w:84%"></b><b style="--w:62%"></b>
<div class="cd"><span style="--k:110,168,255"></span><span style="--k:185,140,255"></span><span style="--k:63,214,196"></span></div>
<div class="ch"><i style="--h:38%"></i><i style="--h:56%"></i><i style="--h:44%"></i><i style="--h:72%"></i><i style="--h:60%"></i><i style="--h:86%"></i><i style="--h:68%"></i><i style="--h:100%"></i><i style="--h:78%"></i></div>
<b style="--w:76%"></b><b style="--w:52%"></b>
</div>
</div>
</div></div>
</main>
<script>
const root = document.documentElement, reduce = matchMedia('(prefers-reduced-motion: reduce)');
let timer = 0;
const mode = m => { root.classList.remove('pre', 'on'); if (m) root.classList.add(m); };
// Replay: everything is hidden at once, then the whole arrival plays from its start (under reduced motion, everything comes back at once).
function play() {
clearTimeout(timer); mode('pre'); void root.offsetWidth;
timer = setTimeout(() => mode(reduce.matches ? '' : 'on'), reduce.matches ? 350 : 200);
}
// The arrival plays once, a moment after the page and its font are ready; under reduced motion everything is simply there.
function arrive() {
if (reduce.matches) return;
if (document.hidden) { document.addEventListener('visibilitychange', arrive, { once: true }); return; }
timer = setTimeout(() => mode('on'), 250);
}
addEventListener('message', e => {
if (e.source !== parent || !e.data) return;
if (e.data.fx === 'replay') play();
});
reduce.addEventListener('change', () => { clearTimeout(timer); mode(''); });
addEventListener('load', () => Promise.race([document.fonts && document.fonts.ready, new Promise(r => setTimeout(r, 1000))]).then(arrive));
</script>
</body>
</html>