
If the dimensions of the ::view-transition-group(*)
don’t change between the old and new snapshot you can optimize its keyframes so that it animates on the compositor.
A rather geeky/technical weblog, est. 2001, by Bramus
::view-transition-group(*)
animationsRecently built a demo that demonstrated a specific animation. Only problem: if you missed it, you had no way of restarting it. Instead of forcing the visitor to reload the page, this little JavaScript-snippet – attached to a button click – did the trick: const restartAnimations = ($el) => { $el.getAnimations().forEach((anim) => { anim.cancel(); anim.play(); …
Continue reading “JavaScript: Restart all CSS Animations of an Element”
A new animation library, built on the Web Animations API for the smallest filesize and the fastest performance. import { animate } from “motion” const boxes = document.querySelectorAll(".box"); animate(boxes, { backgroundColor: "red" }); Motion One → Be sure to also read the “Improvements over WAAPI” page.
@scroll-timeline
(Part 3)🚨 UPDATE: The Scroll-Linked Animations Specification and its proposed syntax have undergone a major rewrite. This post details an older version of the syntax and has not been updated to reflect these changes. Do note that the concept of a Scroll-Linked Animation still stands, it’s only the syntax that has changed since writing this. Please …
Continue reading “The Future of CSS: Scroll-Linked Animations with @scroll-timeline
(Part 3)“
Nice demo by Jhey in which he created a Pure CSS Stopwatch: See the Pen Pure CSS Working Stopwatch 😎 (@property) by Jhey (@jh3y) on CodePen. It uses a clever combination of CSS Animations, CSS Counters, and @property: Each digit gets its own CSS Animation with its own timing. Inside each animation the value of …