Style animation Property
Changing the animation of a <div> element, using the shorthand property:
document.getElementById("myDIV").style.animation = "mynewmove 4s 2";Try it Yourself »
The animation property is a shorthand property for six of the animation properties:
Note: Always specify the animationDuration property, otherwise the duration is 0, and will never be played.
Return the animation property:
Set the animation property:
object.style.animation = "name duration timingFunction delay iterationCount direction fillMode playState"
|Specifies the name of the keyframe you want to bind to the selector
|Specifies how many seconds or milliseconds an animation takes to complete
|Specifies the speed curve of the animation
|Specifies a delay before the animation will start
|Specifies how many times an animation should be played
|Specifies whether or not the animation should play in reverse on alternate cycles
|Specifies what values are applied by the animation outside the time it is executing
|Specifies whether the animation is running or paused
|Sets this property to its default value. Read about initial
|Inherits this property from its parent element. Read about inherit
|none 0 ease 0 1 normal none running
|A String, representing the animation property of an element
animation is a CSS3 (1999) feature.
It is fully supported in all browsers:
CSS reference: animation property