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: Zoom Transition: a run cut short in Compare stops the copy's fade too, so the halves match at once

matin033467e40c62
diff --git a/animations/03-page-transitions/zoom-transition/index.html b/animations/03-page-transitions/zoom-transition/index.html
index 3ea903eb..c6572c5e 100644
--- a/animations/03-page-transitions/zoom-transition/index.html
+++ b/animations/03-page-transitions/zoom-transition/index.html
@@ -306,7 +306,7 @@
}
// The copy's resting look for page n
function showTwin(n){
- twinPages.forEach((el,i)=>{el.classList.toggle('active',i===n);el.style.transition='';el.style.opacity=''});
+ twinPages.forEach((el,i)=>{el.classList.toggle('active',i===n);el.style.transition='';el.style.opacity='';el.getAnimations().forEach(a=>a.cancel())});
twinNav.forEach((b,i)=>b.classList.toggle('active',i===n));
}
// The resting state for page n, at once