CSS3 animationProperty

Example

Use the shorthand property to bind animation to a <div> element:

div { animation:mymove 5s infinite; -webkit-animation:mymove 5s infinite; /*Safari and Chrome*/ }

Try it Yourself »

Browser Support

The numbers in the table indicate the first browser version number that supports the property.

The number immediately preceding -webkit-, -ms-, or -moz- is the first browser version number that supports the prefixed property.

Property
animation 43.0
4.0 -webkit-
10.0 16.0
5.0 -moz-
9.0
4.0 -webkit-
30.0
15.0 -webkit-
12.0 -o-

Default Value: none 0 ease 0 1 normal
Inherited: no
version: CSS3
JavaScript Syntax: object.style.animation="mymove 5s infinite"


Syntax

animation: name duration timing-function delay iteration-count direction fill-mode play-state;

Value Description
animation-name Specifies the name of the keyframe to bind to the selector.
animation-duration Specifies how many seconds or milliseconds an animation takes to complete.
animation-timing-function Sets how an animation will complete a cycle.
animation-delay Sets the delay interval before an animation starts.
animation-iteration-count Defines the number of times an animation plays.
animation-direction Specifies whether the animation should play in reverse alternately.
animation-fill-mode Specifies the style to apply to the element when the animation is not playing (when the animation has finished, or when the animation has a delay and has not started playing).
animation-play-state Specifies whether the animation is running or paused.
initial Sets the property to its default value.Read AboutinitialIntroduction.
inherit Inherits the property from the parent element.Read AboutinitinheritalIntroduction.


Related Articles

CSS3 Tutorial:CSS3 Animations

other extensions