Contact Us | +1 888 239-0733 (Toll free US/CA) Mon-Fri: 7:30am to 4:30pm (PST)

CSS 'animation-play-state' Property Explained

Est. Reading: 1 minute
Updated: April 1, 2024

The CSS 'animation-play-state' property allows you to control the running state of an animation, allowing you to pause and resume it as needed. This property is particularly useful for creating interactive animations that respond to user inputs, such as hover effects or animations that can be paused and resumed with buttons or other controls.

CSS 'animation-play-state' Property Examples

See the Pen CSS 'animation-play-state' Property by Webzstore (@webzstore) on CodePen.

The 'animation-play-state' property adds a layer of interactivity to web pages by allowing animations to be paused and resumed. This enhances the user experience with dynamic and responsive visual feedback.

Browser Support For 'animation-play-state' Property

FirefoxSafariChromeMicrosoft EdgeOpera
16.0
5.0 -moz-
9.0
4.0 -webkit-
43.0
4.0 -webkit-
10.030.0
15.0 -webkit-
12.0 -o-

CSS Syntax of the 'animation-play-state' Property

animation-play-state: running | paused;

Usage of the 'animation-play-state' Property

You'd use 'animation-play-state' when you want to control the playback of CSS animations dynamically. For example, you might pause an animation when the user scrolls away from an element or hovers over a specific area, providing a more engaging and interactive user experience.

Property Values of the 'animation-play-state' Property

  • Running: The default value. The animation will play as normal.
  • Paused: The animation is paused at its current state. If applied before the animation starts, the animation will be paused at the beginning.

Ryan Parker

Ryan has been a standout in digital marketing since 2010. He's the go-to person for getting businesses noticed online, with over 300 projects under his belt—these range from helping local business owners to big online stores. As the Head of Digital Marketing at Webzstore Solutions, Ryan knows all the tricks to make companies shine on the internet. He's excellent at using the latest tech and smart strategies to get results. Ryan is all about making businesses grow and reach more people online.

chevron-down