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: Color pop previews: Horizontal Scroll, Animated Gradient Background, Floating Elements and Particle Constellation no longer use class names the page styles (.h1, .i, .c1 to .c5)

matin2810d194553e
diff --git a/index.html b/index.html
index 9022ab22..d9a4f766 100644
--- a/index.html
+++ b/index.html
@@ -645,14 +645,14 @@ button,input{font:inherit;color:inherit}
.pv-hscroll .tr i::before{content:"";position:absolute;right:16%;top:16%;width:10cqh;height:10cqh;border-radius:50%;background:#fff}
.pv-hscroll .tr i::after{content:"";position:absolute;left:-20%;right:-20%;bottom:-58%;height:100%;border-radius:50%;background:var(--cp-ink)}
.pv-hscroll .tr u{flex:none;width:70%;height:3.2cqh;margin-bottom:1cqh;border-radius:2cqh;background:var(--cp-ink)}
-.pv-hscroll .tr .h2,.pv-hscroll .tr .h4{background:var(--cp-ink);box-shadow:0 1.3cqh 0 #000,0 3.6cqh 6cqh color-mix(in srgb,var(--cp-sh) 40%,transparent)}
-.pv-hscroll .h2 i,.pv-hscroll .h4 i{background:none}
-.pv-hscroll .h2 i::before,.pv-hscroll .h4 i::before{left:50%;right:auto;top:50%;width:26cqh;height:26cqh;margin:-13cqh 0 0 -13cqh;background:linear-gradient(150deg,var(--g1),var(--g2));box-shadow:0 1.2cqh 0 #000}
-.pv-hscroll .h2 i::after,.pv-hscroll .h4 i::after{display:none}
-.pv-hscroll .h2 u,.pv-hscroll .h4 u{background:#fff}
-.pv-hscroll .h3 i::before{left:14%;right:auto;top:20%}
-.pv-hscroll .h3 i::after{left:-10%;right:-50%;bottom:-66%}
-.pv-hscroll .h4 i::before{border-radius:3cqh}
+.pv-hscroll .tr .hp2,.pv-hscroll .tr .hp4{background:var(--cp-ink);box-shadow:0 1.3cqh 0 #000,0 3.6cqh 6cqh color-mix(in srgb,var(--cp-sh) 40%,transparent)}
+.pv-hscroll .hp2 i,.pv-hscroll .hp4 i{background:none}
+.pv-hscroll .hp2 i::before,.pv-hscroll .hp4 i::before{left:50%;right:auto;top:50%;width:26cqh;height:26cqh;margin:-13cqh 0 0 -13cqh;background:linear-gradient(150deg,var(--g1),var(--g2));box-shadow:0 1.2cqh 0 #000}
+.pv-hscroll .hp2 i::after,.pv-hscroll .hp4 i::after{display:none}
+.pv-hscroll .hp2 u,.pv-hscroll .hp4 u{background:#fff}
+.pv-hscroll .hp3 i::before{left:14%;right:auto;top:20%}
+.pv-hscroll .hp3 i::after{left:-10%;right:-50%;bottom:-66%}
+.pv-hscroll .hp4 i::before{border-radius:3cqh}
.pv-hscroll .rail i{--t0:translateY(0);--t1:translateY(40cqh);animation:k-hscroll-go 6s var(--cp-inout) infinite}
@keyframes k-hscroll-go{0%,10%{transform:var(--t0)}50%,62%{transform:var(--t1)}94%,100%{transform:var(--t0)}}
/* ── region r01a: end ── */
@@ -1008,8 +1008,8 @@ button,input{font:inherit;color:inherit}
.pv-gradbg .gb{position:absolute;left:0;top:0;width:260cqw;height:100cqh;background:linear-gradient(112deg,var(--g1) 0%,color-mix(in srgb,#fff 62%,var(--g1)) 15%,var(--g2) 34%,color-mix(in srgb,var(--g2) 40%,#ff3d8b) 51%,var(--g2) 68%,color-mix(in srgb,#fff 55%,var(--g1)) 85%,var(--g1) 100%);animation:k-gradbg-pan 6s var(--cp-inout) infinite}
.pv-gradbg .cd{position:absolute;left:26cqw;top:33cqh;width:48cqw;height:46cqh;display:flex;flex-direction:column;justify-content:center;gap:2.3cqh;padding:0 4.6cqw;border-radius:4.6cqh;background:#fff;box-shadow:var(--cp-lift)}
.pv-gradbg .cd b{display:block;flex:none;height:3cqh;border-radius:2cqh;background:var(--cp-ink)}
-.pv-gradbg .cd .h1{width:84%}
-.pv-gradbg .cd .h2{width:56%}
+.pv-gradbg .cd .hb1{width:84%}
+.pv-gradbg .cd .hb2{width:56%}
.pv-gradbg .cd .t1,.pv-gradbg .cd .t2{height:2.4cqh;background:var(--cp-lip)}
.pv-gradbg .cd .t1{width:92%;margin-top:1.2cqh}
.pv-gradbg .cd .t2{width:70%}
@@ -1099,7 +1099,7 @@ button,input{font:inherit;color:inherit}
.pv-floaters .f{left:88cqw;top:20cqh;width:6.4cqh;height:6.4cqh;border-radius:50%;background:var(--cp-ink);--t:5.2s;--x1:-3cqw;--y1:6cqh;--x2:-6cqw;--y2:2cqh;--x3:-2cqw;--y3:-4cqh;--r:0deg}
.pv-floaters .g{left:54cqw;top:76cqh;width:17cqw;height:7cqh;border-radius:3.5cqh;background:#fff;box-shadow:0 1cqh 0 var(--cp-lip);--t:7.6s;--x1:-6cqw;--y1:-4cqh;--x2:-10cqw;--y2:1cqh;--x3:-4cqw;--y3:4cqh;--r:-24deg}
.pv-floaters .h{left:22cqw;top:30cqh;width:13cqh;height:13cqh;background:rgba(255,255,255,.8);clip-path:polygon(35% 0,65% 0,65% 35%,100% 35%,100% 65%,65% 65%,65% 100%,35% 100%,35% 65%,0 65%,0 35%,35% 35%);--t:6s;--x1:3cqw;--y1:6cqh;--x2:-2cqw;--y2:10cqh;--x3:-4cqw;--y3:3cqh;--r:90deg}
-.pv-floaters .i{left:86cqw;top:76cqh;width:11cqh;height:11cqh;border-radius:50%;border:1.8cqh solid var(--cp-ink);--t:6.6s;--x1:-4cqw;--y1:-5cqh;--x2:-7cqw;--y2:1cqh;--x3:-2cqw;--y3:5cqh;--r:0deg}
+.pv-floaters .j{left:86cqw;top:76cqh;width:11cqh;height:11cqh;border-radius:50%;border:1.8cqh solid var(--cp-ink);--t:6.6s;--x1:-4cqw;--y1:-5cqh;--x2:-7cqw;--y2:1cqh;--x3:-2cqw;--y3:5cqh;--r:0deg}
@keyframes k-floaters-drift{0%,100%{transform:translate(0,0) rotate(0deg)}25%{transform:translate(var(--x1),var(--y1)) rotate(var(--r))}50%{transform:translate(var(--x2),var(--y2)) rotate(calc(var(--r) * 2))}75%{transform:translate(var(--x3),var(--y3)) rotate(var(--r))}}
/* dotgrid · Grid / Dot Pattern Parallax: the fingertip glides around an ink window and the white dot grid behind it shifts the other way, with a soft light under the pointer */
.pv-dotgrid .gd{position:absolute;inset:-8cqh -6cqw;background:radial-gradient(circle,rgba(255,255,255,.9) 0 1cqh,transparent 1.3cqh) 0 0/12cqh 12cqh;animation:k-dotgrid-grid 5.6s var(--cp-inout) infinite}
@@ -1126,11 +1126,11 @@ button,input{font:inherit;color:inherit}
/* constell · Particle Constellation: on the dusk sky, white dots drift in loose groups; a line joins two dots while they are close and fades as they pull apart, so the network keeps forming and breaking */
.pv-constell{background:var(--cp-dusk)}
.pv-constell .cl,.pv-constell .fd{position:absolute;width:0;height:0;animation:k-constell-drift var(--t) var(--cp-inout) infinite}
-.pv-constell .c1{left:30cqw;top:62cqh;--x:3cqw;--y:-4cqh;--t:7.4s}
-.pv-constell .c2{left:68cqw;top:42cqh;--x:-3cqw;--y:5cqh;--t:6.8s}
-.pv-constell .c3{left:85cqw;top:78cqh;--x:-4cqw;--y:-3cqh;--t:8s}
-.pv-constell .c4{left:50cqw;top:32cqh;--x:4cqw;--y:3cqh;--t:7.8s}
-.pv-constell .c5{left:12cqw;top:50cqh;--x:3cqw;--y:5cqh;--t:6.4s}
+.pv-constell .cn1{left:30cqw;top:62cqh;--x:3cqw;--y:-4cqh;--t:7.4s}
+.pv-constell .cn2{left:68cqw;top:42cqh;--x:-3cqw;--y:5cqh;--t:6.8s}
+.pv-constell .cn3{left:85cqw;top:78cqh;--x:-4cqw;--y:-3cqh;--t:8s}
+.pv-constell .cn4{left:50cqw;top:32cqh;--x:4cqw;--y:3cqh;--t:7.8s}
+.pv-constell .cn5{left:12cqw;top:50cqh;--x:3cqw;--y:5cqh;--t:6.4s}
.pv-constell .fd{--t:6.2s}
.pv-constell .d1{left:50cqw;top:86cqh;--x:6cqw;--y:-4cqh}
.pv-constell .d2{left:91cqw;top:24cqh;--x:-4cqw;--y:6cqh;--t:7s}
@@ -2160,7 +2160,7 @@ function pvMarkup(k){
case 'story': return '<span class="po"><i class="w2 anim"><b class="anim"></b></i><i class="w3 anim"></i></span><span class="rv"></span><span class="sc anim">'+[1,2,3].map(n=>'<span class="cd q'+n+' anim"><i></i><b></b><b></b><b></b></span>').join('')+'</span><span class="rail"><i class="anim"></i></span>';
case 'reveal': return '<span class="vw"><span class="ls anim">'+[0,1,2,3,4].map(i=>'<span class="it" style="--i:'+i+'">'+(i<4?'<b'+(i===2?' class="c anim"':i===3?' class="d anim"':'')+'><i class="th"></i><i class="h"></i><i></i></b>':'')+'</span>').join('')+'</span></span><span class="ln"></span><span class="rail"><i class="anim"></i></span>';
case 'stagger': return '<span class="gp anim">'+[0,1,2,3,4,5].map(n=>'<i style="--c:'+n%3+';--r:'+(n/3|0)+'"></i>').join('')+[0,1,2,3,4,5].map(n=>'<b class="anim" style="--c:'+n%3+';--r:'+(n/3|0)+';--n:'+n+'"></b>').join('')+'</span><span class="rail"><i class="anim"></i></span>';
- case 'hscroll': return '<span class="tr anim">'+[1,2,3,4].map(n=>'<b class="h'+n+'"><i></i><u></u></b>').join('')+'</span><span class="rail"><i class="anim"></i></span>';
+ case 'hscroll': return '<span class="tr anim">'+[1,2,3,4].map(n=>'<b class="hp'+n+'"><i></i><u></u></b>').join('')+'</span><span class="rail"><i class="anim"></i></span>';
// ── region r01a: end ──
// ── region r01b: start ──
case 'sticky': return '';
@@ -2323,7 +2323,7 @@ function pvMarkup(k){
// ── region r06b: end ──
// ── region r07a: start ──
case 'sig7': return '<span class="hal anim"></span><span class="sun"></span>'+[1,2,3].map(k=>'<span class="cld k'+k+' anim"></span>').join('')+[1,2,3].map(k=>'<i class="tw t'+k+' anim"></i>').join('');
- case 'gradbg': return '<span class="gb anim"></span><span class="cd"><b class="h1"></b><b class="h2"></b><b class="t1"></b><b class="t2"></b><i></i></span>';
+ case 'gradbg': return '<span class="gb anim"></span><span class="cd"><b class="hb1"></b><b class="hb2"></b><b class="t1"></b><b class="t2"></b><i></i></span>';
case 'mesh': return [1,2,3,4,5].map(k=>'<i class="b b'+k+' anim"></i>').join('');
case 'aurora': return '<span class="st anim"></span><svg class="rb" viewBox="0 0 160 100" preserveAspectRatio="none"><path class="r1 anim" d="M-30 46C14 18 50 66 90 38S146 18 190 40"/><path class="r2 anim" d="M-30 30C18 54 56 12 96 30S150 50 190 24"/><path class="r3 anim" d="M-30 58C22 36 58 74 98 52S152 36 190 56"/></svg><span class="hz"></span>';
case 'grain2': return '<span class="fs"><span class="row">'+'<i></i>'.repeat(14)+'</span><span class="row rb">'+'<i></i>'.repeat(14)+'</span>'+[0,1,2].map(k=>'<i class="fr f'+k+'"><b class="sun"></b><b class="hill"></b>'+(k===1?'<b class="fl anim"></b>':'')+'</i>').join('')+'</span><span class="gn anim"></span>';
@@ -2332,10 +2332,10 @@ function pvMarkup(k){
case 'starfield': return '<span class="vp anim"></span>';
case 'glow': return '<span class="gw g2 anim"></span><span class="gw anim"></span><span class="orb anim"></span>';
case 'aripple': return [1,2,3].map(k=>'<span class="src s'+k+'"><i class="anim"></i><i class="anim"></i></span>').join('');
- case 'floaters': return [...'dahgecbfi'].map(c=>'<i class="'+c+' anim"></i>').join('');
+ case 'floaters': return [...'dahgecbfj'].map(c=>'<i class="'+c+' anim"></i>').join('');
case 'dotgrid': return '<span class="gd anim"></span><span class="lt anim"></span><span class="win"><s><i></i><i></i><i></i></s><b class="w1"></b><b class="w2"></b><b class="w3"></b></span><span class="tip anim"></span>';
case 'geo': return '<svg class="gm" viewBox="0 0 160 100">'+[[3,11],[4,18],[5,25],[6,32],[7,39]].map(([n,r],k)=>'<polygon class="p'+(k+1)+' anim" points="'+Array.from({length:n},(_,i)=>{const a=-Math.PI/2+i*2*Math.PI/n;return (88+r*Math.cos(a)).toFixed(1)+','+(58+r*Math.sin(a)).toFixed(1);}).join(' ')+'"/>').join('')+'</svg>';
- case 'constell': return [[1,1,3],[2,4,6],[3,7,8],[4,9,10],[5,11,11]].map(([c,a,b])=>'<span class="cl c'+c+' anim">'+Array.from({length:b-a+1},(_,i)=>'<span class="sp s'+(a+i)+' anim"><i class="ln anim"></i><b class="dt anim"></b></span>').join('')+'<b class="hub"></b></span>').join('')+[1,2,3,4].map(k=>'<b class="fd d'+k+' anim"></b>').join('');
+ case 'constell': return [[1,1,3],[2,4,6],[3,7,8],[4,9,10],[5,11,11]].map(([c,a,b])=>'<span class="cl cn'+c+' anim">'+Array.from({length:b-a+1},(_,i)=>'<span class="sp s'+(a+i)+' anim"><i class="ln anim"></i><b class="dt anim"></b></span>').join('')+'<b class="hub"></b></span>').join('')+[1,2,3,4].map(k=>'<b class="fd d'+k+' anim"></b>').join('');
// ── region r07a: end ──
// ── region r07b: start ──
case 'flow': return '';