VOOZH about

URL: https://www.geeksforgeeks.org/css/css-animation-play-state-property/

⇱ CSS animation-play-state Property - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

CSS animation-play-state Property

Last Updated : 11 Jul, 2025

The animation-play-state property in CSS controls animation playback: paused stops, running starts, initial resets to default, and inherit inherits from its parent element.

Syntax

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

Property Value

The animation-play-state property is listed below:

ValueDescription
pausedSpecifies that the animation is paused.
runningThe default value specifies that the animation is running.
initialSets the animation property to its default value.
inheritInherits the animation property from its parent element.

Example: Running Animation

In this example we demonstrate a running animation using the animation-play-state property, causing a green square to move across the screen continuously from left to right.

Output:

👁 Animation-running
CSS animation-play-state Property - Running Animation Example Output

Example: Paused Animation

In this example, we demonstrates a paused animation using the animation-play-state property, halting the green square's movement across the screen.

Output:

👁 pause
CSS animation-play-state Property - Paused Animation Example Output

Supported Browser

The browser supported by animation-play-state property are listed below:

Comment
Article Tags: