css动画设置

CSS动画

不同浏览器的动画效果
div
{
width:100px;
height:100px;
background:red;
position:relative;
animation:mymove 5s infinite;
-moz-animation:mymove 5s infinite; /* Firefox /
-webkit-animation:mymove 5s infinite; /
Safari and Chrome /
-o-animation:mymove 5s infinite; /
Opera /
}
/
infinite 永久的 */

@keyframes mymove
{
0% {top:0px;}
25% {top:200px;}
75% {top:50px}
100% {top:100px;}
}

@-moz-keyframes mymove /* Firefox */
{
0% {top:0px;}
25% {top:200px;}
75% {top:50px}
100% {top:100px;}
}

@-webkit-keyframes mymove /* Safari and Chrome */
{
0% {top:0px;}
25% {top:200px;}
75% {top:50px}
100% {top:100px;}
}

@-o-keyframes mymove /* Opera */
{
0% {top:0px;}
25% {top:200px;}
75% {top:50px}
100% {top:100px;}
}


注释:本例在 Internet Explorer 中无效。

posted @ 2016-05-21 17:27  花间草  阅读(191)  评论(0)    收藏  举报