Interactive online courses HTML Academy
2026-03-09 12:24 Diff

In the previous examples, elements went back to the original state after being animated. However, there is a property that will define whether an animation effect will remain visible after the playback is over. It’s called animation-fill-mode. When the property is set to forwards, the element will keep its state after the animation is over.

Let’s see how this property works using an example: we will apply the same animation to two identical objects, then change the value of the animation-fill-mode property and see what happens.