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
fix: redraw Zoom Into Image at once when the window is resized
matin915c1289cb6e
diff --git a/animations/01-scroll-based/zoom-into-image/index.html b/animations/01-scroll-based/zoom-into-image/index.htmlindex 4884bd2d..236902d1 100644--- a/animations/01-scroll-based/zoom-into-image/index.html+++ b/animations/01-scroll-based/zoom-into-image/index.html@@ -28,7 +28,7 @@.spacer{height:60cqh;display:flex;align-items:center;justify-content:center;padding:0 24px;font-size:13px;letter-spacing:.1em;color:#8a8a92;text-align:center}#zoom-section{height:250cqh;position:relative}#zoom-sticky{position:sticky;top:0;height:100cqh;display:flex;align-items:center;justify-content:center;overflow:hidden}- /* Frame shown when showFrame is on */+ /* The outline where the window began; the Shows the starting frame switch fades it */#frame{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;opacity:1;transition:opacity .4s}.frame-border{position:absolute;border:1px solid rgba(255,255,255,.15);border-radius:calc(var(--br-start) * 1px + 2px);pointer-events:none}/* The landscape image (clip-path drives the reveal) */@@ -219,6 +219,7 @@}stage.addEventListener('scroll',()=>{if(!ticking){requestAnimationFrame(update);ticking=true}},{passive:true});+ window.addEventListener('resize',update); // the box changes height under the same scroll positionmotionMQ.addEventListener('change',update);function choices(id,pick){