Style animationPlayState attribute
- Σελίδα προηγούμενη animationTimingFunction
- Σελίδα επόμενη background
- Επιστροφή στο προηγούμενο επίπεδο Αντικείμενο Style του HTML DOM
Definition and Usage
animationPlayState
This attribute specifies whether the animation is running or paused.
Note:Use this attribute to pause the animation in the middle of the loop.
See also:
CSS Reference Manual:animation-play-state attribute
Example
Pause the animation:
document.getElementById("myDIV").style.animationPlayState = "paused";
Syntax
Return the animationPlayState attribute:
object.style.animationPlayState
Set the animationPlayState attribute:
object.style.animationPlayState = "running|paused|initial|inherit"
Attribute value
Value | Description |
---|---|
running | Default value. Specifies that the animation is running. |
paused | Specifies the pause of the animation. |
initial | Sets this attribute to its default value. See also initial. |
inherit | Inherits this attribute from its parent element. See also inherit. |
Technical details
Default value: | running |
---|---|
Return value: | A string that represents the animation-play-state attribute. |
CSS version: | CSS3 |
Browser support
animationPlayState
is a CSS3 (1999) feature.
All browsers fully support it:
Chrome | Edge | Firefox | Safari | Opera | IE |
---|---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera | IE |
Υποστήριξη | Υποστήριξη | Υποστήριξη | Υποστήριξη | Υποστήριξη | 11 |
- Σελίδα προηγούμενη animationTimingFunction
- Σελίδα επόμενη background
- Επιστροφή στο προηγούμενο επίπεδο Αντικείμενο Style του HTML DOM