CSS animation-fill-mode Property
Specifies which values are used by the animation while it is not running.
Syntax
Property Values
Value | Description |
---|---|
none | Animation will not apply any attributes to the element before or after it is executed. This is the default value. |
forwards | After the animation is finished, the element will remain the same animation attributes as the previous keyframe. |
backwards | The element will inherit the characteristics of the initial keyframe prior to the commencement of the animation. |
both | The animation will follow the rules for both forward and backward motion, i.e. it will obtain the properties provided for the beginning keyframe before starting and will maintain the value of the last keyframe when the animation is finished. |
initial | Set this property's value to the default. |
inherit | This attribute is inherited from its parent element. |
Supported Browsers
Element | Chrome | Firefox | Safari | Edge / IE | Opera |
---|---|---|---|---|---|
animation-fill-mode |
43.0
4.0 -webkit- |
16.0
5.0 -moz- |
9.0
4.0 -webkit- |
10.0 |
30.0
15.0 -webkit- 12.1 12.0 -o- |