To reverse an animation that has already been executed using only CSS, you can use the animation-direction
property. By setting this property to reverse
, the animation will play backwards.
For example, if you have an animation called myAnimation
with a duration of 2 seconds and you want to reverse it, you can do the following:
animation-name: myAnimation;
animation-duration: 2s;
animation-direction: reverse;
This will cause the animation to play backwards for a duration of 2 seconds, effectively reversing the animation.
Asked: 2023-05-07 12:34:36 +0000
Seen: 8 times
Last updated: May 07 '23