Labels:
HTML
CSS
CSS3
CSS3 Animation Basic Framework
The example code of basic framework
.className {
-webkit-animation: className 4s;
-o-animation: className 4s;
animation: className 4s;
}
@-webkit-keyframes className {
}
Inside Keyframes
The example code of animation code
@-webkit-keyframes className {
n%,m% {
attribute: value;
-webkit-transform: translateX(-20px) translateY(-20px)
rotate(-20deg) scale(2.5,3.5);
-webkit-animation-timing-function: ease-out;
-webkit-animation-fill-mode:forwards;
}
}
Problem to Notice
While changing 'height', add 'vertical-align: top' when necessary.
Putting 'rotate' and 'scale' together may have some unexpected effects.