CSS animation-play-state Property






<!--
main_leaderboard, all: [728,90][970,90][320,50][468,60]
-->




CSS animation-play-state Property



Previous
Complete CSS Reference
Next



Example


Pause an animation:



div {
   
animation-play-state: paused;
}

Try it Yourself »

More "Try it Yourself" examples below.




Definition and Usage


The animation-play-state property specifies whether the animation is running or paused.


Note: Use this property in a JavaScript to pause an animation in the middle of a cycle.
























Default value: running
Inherited: no
Animatable: no. Read about animatable
Version: CSS3
JavaScript syntax: object.style.animationPlayState="paused"
Try it




Browser Support


The numbers in the table specify the first browser version that fully supports the property.


Numbers followed by -webkit-, -moz-, or -o- specify the first version that worked with a prefix.




















Property
animation-play-state 43.0
4.0 -webkit-
10.0 16.0
5.0 -moz-
9.0
4.0 -webkit-
30.0
15.0 -webkit-
12.0 -o-







<!--
mid_content, all: [300,250][336,280][728,90][970,250][970,90][320,50][468,60]
-->





CSS Syntax



animation-play-state: paused|running|initial|inherit;

Property Values





























Value Description Play it
paused Specifies that the animation is paused Play it »
running Default value. Specifies that the animation is running Play it »
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit




Related Pages


CSS tutorial: CSS Animations


HTML DOM reference: animationPlayState property




More Examples



Example


Pause an animation on hover:



div:hover {
    animation-play-state: paused;
}

Try it Yourself »



Previous
Complete CSS Reference
Next

Popular posts from this blog

Chat program with C++ and SFML

Function to Return a JSON Like Objects Using VBA Collections and Arrays

Will my employers contract hold up in court?