CSS animation

Definitions and usages

Some CSS properties can be animated, which means they can be used for animation and transition.

Animation properties can gradually change from one value to another, such as size, quantity, percentage, and color.


Browser support

The numbers in the table support the version number of the first browser for this method.

Immediately after the number - webkit-, -moz-, or -o- specifies the first browser version prefix that supports the property.

CSS animation
Animated properties Instance

The background color gradually changes from red to blue:

@keyframes mymove
{
from {background-color:red;}
to {left:blue;}
}

/ * Safari and Chrome: * /
@-webkit-keyframes mymove
{
from {background-color:red;}
to {background-color:blue;}
}

Try it out . . .

Animation properties in CSS:

Property Instance
background Give it a try . . .
background-color Give it a try . . .
background-position Give it a try . . .
background-size Give it a try . . .
border Give it a try . . .
border-bottom Give it a try . . .
border-bottom-color Give it a try . . .
border-bottom-left-radius Give it a try . . .
border-bottom-right-radius Give it a try . . .
border-bottom-width Give it a try . . .
border-color Give it a try . . .
border-left Give it a try . . .
border-left-color Give it a try . . .
border-left-width Give it a try . . .
border-right Give it a try . . .
border-right-color Give it a try . . .
border-right-width Give it a try . . .
border-spacing Give it a try . . .
border-top Give it a try . . .
border-top-color Give it a try . . .
border-top-left-radius Give it a try . . .
border-top-right-radius Give it a try . . .
border-top-width Give it a try . . .
bottom Give it a try . . .
box-shadow Give it a try . . .
clip Give it a try . . .
color Give it a try . . .
column-count Give it a try . . .
column-gap Give it a try . . .
column-rule Give it a try . . .
column-rule-color Give it a try . . .
column-rule-width Give it a try . . .
column-width Give it a try . . .
columns Give it a try . . .
filter Give it a try . . .
flex
flex-basis Give it a try . . .
flex-grow Give it a try . . .
flex-shrink Give it a try . . .
font Give it a try . . .
font-size Give it a try . . .
font-size-adjust
font-stretch
font-weight Give it a try . . .
height Give it a try . . .
left Give it a try . . .
letter-spacing Give it a try . . .
line-height Give it a try . . .
margin Give it a try . . .
margin-bottom Give it a try . . .
margin-left Give it a try . . .
margin-right Give it a try . . .
margin-top Give it a try . . .
max-height Give it a try . . .
max-width Give it a try . . .
min-height Give it a try . . .
min-width Give it a try . . .
opacity Give it a try . . .
order Give it a try . . .
outline Give it a try . . .
outline-color Give it a try . . .
outline-offset Give it a try . . .
outline-width Give it a try . . .
padding Give it a try . . .
padding-bottom Give it a try . . .
padding-left Give it a try . . .
padding-right Give it a try . . .
padding-top Give it a try . . .
perspective Give it a try . . .
perspective-origin Give it a try . . .
right Give it a try . . .
text-decoration-color Give it a try . . .
text-indent Give it a try . . .
text-shadow Give it a try . . .
top Give it a try . . .
transform Give it a try . . .
transform-origin Give it a try . . .
vertical-align Give it a try . . .
visibility
width Give it a try . . .
word-spacing Give it a try . . .
z-index Give it a try . . .