The animation-play-state property lets you pause or resume a CSS animation without removing it. It is useful for hover effects, play buttons, and interactive UI controls.
01
Pause & Resume
Control playback state.
02
Syntax
running and paused.
03
Default running
Animations play normally.
04
Freeze Frame
Pause at current progress.
05
CSS Triggers
Use :hover or classes.
06
Multiple Animations
Pause one or many at once.
Fundamentals
Definition and Usage
The animation-play-state CSS property controls whether an animation is running or paused. When paused, the animation stops at its current frame and keeps that visual state until playback resumes.
This property is especially helpful when you want user interaction to control motion. For example, you can pause a loader until the user hovers over it, or add a button that toggles animation playback with a CSS class.
💡
Beginner Tip
animation-play-state does not remove the animation. It only pauses or resumes playback, so the element keeps its animation settings.
The box stays still until hover changes animation-play-state from paused to running.
Example 2 — Toggle Pause with a Button
Use a CSS class and JavaScript to switch between paused and running states.
animation-play-state-toggle.html
<style>.spinner{animation:spin 1s linear infinite;animation-play-state:running;}.spinner.is-paused{animation-play-state:paused;}</style><buttonid="toggleBtn">Pause</button><divclass="spinner"id="spinner"></div>
The first value controls fadeIn and the second controls pulse, matching the order in animation-name.
🧠 How animation-play-state Works
1
Animation starts running
By default, animation-play-state is running and keyframes progress normally.
Default
2
You set paused
The browser freezes the animation at the current frame without removing it.
Freeze
3
You set running again
Playback resumes from the same progress point, not from the beginning.
Resume
=
▶️
Interactive playback
Users can pause and resume motion with CSS or JavaScript controls.
Compatibility
Universal Browser Support
animation-play-state is supported in all modern browsers alongside CSS animations.
✓ Baseline · CSS Animations
Pause and resume animations in modern browsers
Chrome, Firefox, Safari, Edge, and Opera all support running and paused play states.
98%Modern browser support
Google Chrome43+ · Desktop & Mobile
Full support
Mozilla Firefox16+ · Desktop & Mobile
Full support
Apple Safari9+ · macOS & iOS
Full support
Microsoft Edge12+ · Modern versions
Full support
Opera30+ · Modern versions
Full support
Legacy browsers
Very old browsers without CSS animation support also lack animation-play-state.
💻
Internet ExplorerIE 9 and earlier · No CSS animation support
None
animation-play-state property98% supported
Bottom line: Use play state for interactive pause and resume controls in modern browsers.
Wrap Up
Conclusion
The animation-play-state property gives you simple playback control over CSS animations. Set it to paused to freeze motion, or running to resume from the same frame.
Combine it with :hover, focus states, or JavaScript classes to build interactive effects such as hover-to-play demos, pause buttons, and animated sections users can control.
Toggle a class with JavaScript for pause and resume buttons
Respect prefers-reduced-motion for accessibility
Keep animation properties attached when pausing
Match comma-separated play states to animation order
❌ Don’t
Confuse paused with removing the animation entirely
Expect paused animations to restart from zero when resumed
Rely on hover-only controls for essential functionality on touch devices
Forget to provide a keyboard-accessible pause control when needed
Mix up the order of values when using multiple animations
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about animation-play-state
Use these points when building interactive animations.
5
Core concepts
▶️01
Two Values
running and paused.
Syntax
⏹️02
Default running
Animations play normally.
Default
🔒03
Freeze Frame
Pause keeps current progress.
Behavior
🖱04
User Control
Great for buttons and hover.
Pattern
📈05
Not a Stop
Pause differs from removing animation.
Concept
❓ Frequently Asked Questions
The animation-play-state property controls whether a CSS animation is running or paused. When paused, the animation freezes at its current frame until you set it back to running.
The initial value is running, which means the animation plays normally as soon as it starts.
paused keeps the animation attached and frozen at the current progress. Removing animation or setting animation-name to none stops the animation entirely and resets styling based on other properties.
Yes. Common patterns include :hover, :focus-within, or toggling a class with JavaScript. For example, .box:hover { animation-play-state: running; } can resume playback on hover.
Yes. You can list running and paused values separated by commas, and each value pairs with the corresponding animation in the same order.