
Anonymous A. answered 01/13/20
CSS Expert with 10+ years of experience
To stop a keyframe animation in CSS, you use the forwards
value in the animation-fill-mode
property.
The syntax looks like this:
Here's how it looks in a complete animation declaration (taken from Mozilla Developer Network):
HTML
CSS
Here's a demo on JSFiddle: https://jsfiddle.net/7da4gqzy/
More information on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode