HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

animation-direction

Description

The animation-direction property for CSS defines whether or not the animation should play in reverse on some or all cycles.

Syntax

CSS

animation-direction: value;

JS

object.style.animationDirection = "value";

Values

<'animation-direction'> = <single-animation-direction>#
<single-animation-direction> = normal | reverse | alternate | alternate-reverse
normal

All iterations of the animation are played as specified. Intial.

reverse

All iterations of the animation are played in the reverse direction from the way they were specified.

alternate

The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction.

alternate-reverse

The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction.

Initial

normal

Examples

1 · alternate

2 · alternate-reverse

3 · normal

4 · reverse

5 · JS