---
layout: single
property_name: animation-play-state
---
Defines if an animation is playing or not.
If the
The animation is set paused at the first keyframe. This is different than having either no In this example, the square is visible by default, but the on the first keyframe of
#animation-play-state
default
animation-play-state: running;
animation-duration and animation-name are defined, the animation will start playing automatically.animation-play-state: paused;
animation-duration or animation-name at all. If the animation is paused, the style applied is that of the first keyframe, and not the default style.fadeAndMove, the opacity is set to 0. When paused, the animation will be "stuck" on this first keyframe, and will thus be invisible.@keyframes fadeAndMove {
from {
opacity: 0;
transform: translateX(0);
}
to {
opacity: 0;
transform: translateX(100px);
}
}