Animations Without Keyframes: A New CSS Trick

2025-01-12
Animations Without Keyframes: A New CSS Trick

CSS's new `@starting-style` allows creating animations without `@keyframes`. This isn't a replacement for traditional animation, but a useful CSS trick in certain situations. The article demonstrates two examples: an infinitely rotating square, and a more complex animation manipulating background color, translation, and rotation via an animated variable `--i`. While not always superior, it offers a fresh way to express animations, expanding CSS animation possibilities.