animation-play-state

Allows you to pause and resume a running animation. Typically used in combination with :hover or JavaScript to freeze an animation when a user interacts with it.

It is documented as part of the CSS Animations specification.

/* Usage Example */
.marquee:hover {
  /* Pauses the scrolling text when the mouse is over it */
  animation-play-state: paused;
}

/* Global values */
animation-play-state: inherit;
animation-play-state: initial;
animation-play-state: revert;
animation-play-state: revert-layer;
animation-play-state: unset;
Widely available Since 2015 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.

43+
16+
9+
12+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC