The animation-fill-mode property is used to specify that values which are applied by the animation before and after it is executing. Before playing the first keyframe or after playing the last keyframe CSS animations do not affect the element. The animation-fill-mode property can override this behavior.
animation-fill-mode: none | forwards | backwards | both | initial | inherit;
Property Value: The animation-fill-mode property contains many value which are listed below:
- none: It is the default value. The animation properties will not apply to any element before or after it is executed.
- forwards: The element will retain the same animation properties of the last keyframe after the animation completes.
- backwards: This property value is used to set the element to the first keyframe value before start the animation.
- both: This property is used to follow the rules for both forwards and backwards.
- initial: This property is used to set the property to its default value.
- inherit: This property is used to inherits this property from its parent element.
Supported Browser: The browser supported by animation-fill-mode property are listed below:
- Google Chrome 43.0
- Internet Explorer 10.0
- Firefox 16.0
- Opera 15.0
- Safari 4.0
- HTML | DOM Style animationFillMode Property
- CSS | transition-property Property
- How to override the CSS properties of a class using another CSS class ?
- Difference between bootstrap.css and bootstrap-theme.css
- CSS | table-layout Property
- CSS | text-align Property
- CSS | border-top-width Property
- CSS | isolation Property
- CSS | border-inline-start-style Property
- CSS | column-rule-width Property
- CSS | word-spacing Property
- CSS | animation-delay Property
- CSS | margin-top Property
- CSS | border radius property
- CSS | grid Property
- CSS | font-size-adjust Property
- CSS | visibility Property
- CSS | Display property
- CSS | grid-template-columns Property
- CSS | height Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.