CSS3 transition
In CSS3, we do not need to use Flash animations or JavaScript in order to add an effect that can be changed from one style to another. Move over the following elements with the mouse:
This means that when we set the element transition, we suddenly change the attributes of the element, and it slowly transitions past,
In the following method, when the element width is suddenly changed, it will change to the value you changed after 2 seconds.
div{ transition:width 2s; -webkit-transition:width 2s; /* Safari */}
CSS3 Animation
CSS3, we can create animations, which can replace many web animated images, Flash animations, and javascripts.
@keyframes myfirst{from {background:red;} to {Background:yellow;}} @-webkit-keyframes Myfirst/* Safari with Chrome */{from {background:red;} to {Background:yellow;}}
Animation is a pre-set animation process, CSS3 will follow this process.