animation css property is a shorthand for animation-name, animation-duration, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, animation-fill-mode, and animation-play-state. It allows to set animation for an element.


Initial value Initial value of each individual properties set on this property
Applies to all elements in the page


animation: dance 5s linear 2s infinite alternate;


The total number of times the animation has been played.
The direction in which the animation is played.
Defines how the animation's target should be styled before and after it is executed.
Defines whether the animation is playing or not.

Browser support

animation 1 1 3.5 1 12 3

We use cookies to improve your experience. Learn more in our Privacy policy.