Rara’s batik bundle on the work table moves with your @keyframes and the seven animation longhands: playhead, progress and iteration are read off the real…
Why it matters
The right animation makes a UI feel alive; the wrong one flashes, snaps or stutters. Almost every CSS animation bug comes from three things: direction, fill-mode, and which property is animated.
The key idea
Time → progress → value
Common mistakes
Animating width/height/left, and it stutters Those properties trigger a new layout every frame. Animate transform and opacity: both can run on the compositor with no new layout or paint.
A looping animation snaps back every round Every iteration starts again at 0%. Use animation-direction: alternate, or keyframes that return to the start (0%, 100% { … }).
The end state is gone once the animation ends Once finished, the element returns to its own style. animation-fill-mode: forwards holds the last frame; both also applies the first frame during the delay.
Try it in this playground
Switch the easing to linear, then to ease-out Watch the line: linear is straight, ease-out fast at first and slow at the end.
Pause, then scrub the time You are setting the real animation’s currentTime. Watch the progress and the value follow.
Compare normal and alternate in a loopnormal jumps from 1 to 0 every iteration; alternate comes down smoothly.
Pick the left keyframesleft is laid out again every frame. transform: translateX() runs on the compositor and leaves the layout alone.