CSS3animation-iteration-count属性
作用:animation-iteration-count属性定义动画的播放次数。
语法:
animation-iteration-count:n|infinite;
n:定义动画播放次数的数值。
infinite:规定动画应该无限次播放。
注:InternetExplorer9以及更早的版本不支持animation-iteration-count属性。
CSS3animation-iteration-count属性的使用示例
设置动画循环3次
<!DOCTYPEhtml>
<html>
<head>
<style>
div
{
width:100px;
height:100px;
background:red;
position:relative;
animation:mymove3s;
animation-iteration-count:3;
/*SafariandChrome*/
-webkit-animation:mymove3s;
-webkit-animation-iteration-count:3;
}
@keyframesmymove
{
from{top:0px;}
to{top:200px;}
}
@-webkit-keyframesmymove/*SafariandChrome*/
{
from{top:0px;}
to{top:200px;}
}
</style>
</head>
<body>
<div></div>
</body>
</html>

本文转载自中文网

本文转载自中文网
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c56267.shtml