YouTip LogoYouTip

Prop Style Animationdirection

# HTML DOM Style animationDirection Property [![Image 8: Style Object Reference](#) Style Object](#) ## Example Change the animationDirection property of a `
` element: ```javascript document.getElementById("myDIV").style.animationDirection="reverse"; [Try it Yourself Β»](#) * * * ## Definition and Usage The `animationDirection` property sets or returns whether an animation should play in reverse on some or all cycles. **Note:** This property has no effect if the animation is set to play only once. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) Only Firefox supports the `animationDirection` property. * * * ## Syntax Get the `animationDirection` property: ```javascript object.style.animationDirection Set the `animationDirection` property: ```javascript object.style.animationDirection="normal|reverse|alternate|alternate-reverse|initial|inherit" ## Property Values | Value | Description | | --- | --- | | normal | Default value. The animation is played as normal. | | reverse | The animation is played in reverse direction. | | alternate | The animation is played forwards first, then backwards, then forwards, etc. | | alternate-reverse | The animation is played backwards first, then forwards, then backwards, etc. | | 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: | normal | | --- | --- | | Return Value: | A String, representing the animation-direction property of an element. | | CSS Version | CSS3 | * * * ## Related Articles CSS Reference: (#) * * Style Object](#)
← Prop Style AnimationdurationProp Style Animationdelay β†’