CSS3 Animations

to implement CSS3 Animations , you need to part:
1 write a Rule
2 assign the Rule in CSS element

EX:
1 Write the Rule,
they are the same ,but for different browser:
/* Chrome, Safari, Opera */
@-webkit-keyframes myfirst
{
0% {background: red;}
25% {background: yellow;}
50% {background: blue;}
100% {background: green;}
}

/* Standard syntax */
@keyframes buy viagra online myfirst
{
0% {background: red;}
25% {background: yellow;}
50% {background: blue;}
100% {background: green;}
}

2 Then assign the rule :

div
{
-webkit-animation: myfirst 5s; /* Chrome, Safari, Opera */
animation: myfirst 5s;
}

Detail of the CSS Animation properties :
div
{
/* Chrome, Safari, Opera */
-webkit-animation-name: myfirst;
-webkit-animation-duration: 5s;
-webkit-animation-timing-function: linear;
-webkit-animation-delay: 2s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: alternate;
-webkit-animation-play-state: running;
/* Standard syntax */
animation-name: myfirst;
animation-duration: 5s;
animation-timing-function: linear;
animation-delay: 2s;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-play-state: running;
}


Posted

in

by

Tags: