CSS3 animation-fill-mode attribute, animationfillmode
Now I am focusing on mobile development projects. It is very important for animation. Whenever I encounter a new knowledge point, I will share it with you.
Animation-fill-mode: animations an object from one place to another and keeps it there.
Definition and usage
The animation-fill-mode attribute specifies that the style of an element is applied when the animation is not played (when the animation is completed or when there is a delay before playback starts.
By default, CSS animation does not affect elements until the first key frame is played. The animation-fill-mode attribute can override this behavior.
Default Value: |
None |
Inheritance: |
No |
Animations: |
No. |
Version: |
CSS3 |
JavaScript Syntax: |
Object. Style. animationFillMode = "forwards" |
Especially for JavaScript control, it can also be restored to the state of the effect after the last key frame is completed.
<! DOCTYPE html>