Abakada: Back to Basics > Language References > CSS Properties > Animation Properties > animation-play-state Property
Defines whether the animation is running or paused.
CSS |
{ animation-play-state: running | paused } |
Script |
object.style.animationPlayState = running | paused |
Parameter |
Description |
Valid Values |
running |
The animation is currently playing. |
the keyword running |
paused |
The animation is currently paused. |
the keyword paused |
The property is read/write with a default value of running; this attribute is not inherited.
The animation-play-state property sets whether an animation is running or paused.
animation-play-state is specified with either the keywords running or paused.
NOTE: While the separate animation properties can be set individually, the shorthand animation property offers a convenient option to set all animation properties at once.
For a brief overview, please see Understanding and Using CSS Animations.
animation, animation-composition, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-timeline, animation-timing-function