YouTip LogoYouTip

Prop Style Animationdelay

# HTML DOM Style animationDelay Property [![Image 8: Style Object Reference](#) Style Object](#) ## Example Change the animationDelay property of a
element: ```javascript document.getElementById("myDIV").style.animationDelay="1s"; [Try it Yourself Β»](#) * * * ## Definition and Usage The animationDelay property defines when the animation starts. The animationDelay value can be in seconds (s) or milliseconds (ms). **Tip:** Negative values are allowed. A value of -2s means the animation will start immediately, but will start playing from the 2-second mark of the animation. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) Only Firefox supports the animationDelay property. * * * ## Syntax Get the animationDelay property: _object_.style.animationDelay Set the animationDelay property: _object_.style.animationDelay="_time_|initial|inherit" ## Property Values | Value | Description | | --- | --- | | _time_ | Optional. Defines the number of seconds or milliseconds before the animation starts. The default value is 0. | | initial | Sets this property to its default value. Read about _initial_. | | inherit | Inherits this property from its parent element. Read about _inherit_. | ## Technical Details | Default Value: | 0 | | --- | | Return Value: | A string, representing the animation-delay property of an element. | | CSS Version | CSS3 | * * * ## Related Articles CSS Reference: (#) * * Style Object](#)
← Prop Style AnimationdirectionProp Style Animation β†’