Style animationName attribute
- Forrige side animationIterationCount
- Næste side animationTimingFunction
- Gå tilbage til forrige niveau HTML DOM Style Objekt
Definition and usage
animationName
Sets or returns the name of the @keyframes animation to bind to the selector.
Example
Change the animationName property of the <div> element:
document.getElementById("myDIV").style.animationName = "myNEWmove";
Syntax
Return the animationName property:
object.style.animationName
Set the animationName property:
object.style.animationName = "none|keyframename|initial|inherit"
Attribute value
Value | Description |
---|---|
none | default value. Specifies no animation (can be used to override animations from the cascade). |
keyframename | Specifies the name of the keyframe to bind to the selector. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical details
default value: | none |
---|---|
return value: | string, indicating the element's animation-name egenskab. |
CSS version: | CSS3 |
browser support
animationName
is a CSS3 (1999) feature.
All browsers fully support it:
Chrome | Edge | Firefox | Safari | Opera | IE |
---|---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera | IE |
supports | supports | supports | supports | supports | 11 |
related pages
CSS reference manual:animation-name egenskab
- Forrige side animationIterationCount
- Næste side animationTimingFunction
- Gå tilbage til forrige niveau HTML DOM Style Objekt