Interactive online courses HTML Academy
2026-03-09 10:57 Diff

In addition to the animation playback count, we can define the direction of element rotation using the animation-direction property. By default, animation has a normal direction.

However, you can reverse the animation direction to make it play backwards (that is, frame to is where the playback starts and frame from is where it ends). To do this, use reverse as the value of the animation-direction property.

Let’s compare two animation directions in an example.