好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

css3动画不循环怎么办

css3动画不循环可以使用animation -i teration-count属性定义动画的播放次数。只需要在动画中添加“animation- IT eration-count:infinite;”即可实现无限次循环。

本教程操作环境:windows7系统、CSS3 && HT ML 5版、Dell G3 电 脑。

animation-iteration-count 属性定义动画的播放次数。

语法

animation-iteration-count: n|infinite;

实例

<!DOCTY PE  html>
<html>
<head>
<style> 
div
{
width:100px;
h ei ght:100px;
background: red ;
position:relative;
animation:mymove 3s;
animation-iteration-count:3;

/* Safari and Ch rom e */
- webkit -animation:mymove 3s;
-webkit-animation-iteration-count:3;
}

@keyfr am es mymove
{
 From  {top:0px;}
to {top:200px;}
}

@-webkit-keyframes mymove /* Safari and C hr ome */
{
from {top:0px;}
to {top:200px;}
}
</style>
</head>
<body>

<p>< strong >注释:</strong> internet  E xp lorer 9 以及更早的版本不支持 animation-iteration-count 属性。</p>

<div></div>

</body>
</html>

效果:

推荐学习:css视频教程

以上就是css3动画不循环怎么办的详细内容,更多请关注其它相关 文章 !

总结

以上是 为你收集整理的 css3动画不循环怎么办 全部内容,希望文章能够帮你解决 css3动画不循环怎么办 所遇到的问题。

如果觉得 网站内容还不错, 推荐好友。

查看更多关于css3动画不循环怎么办的详细内容...

  阅读:34次

上一篇: react如何引入css

下一篇:css怎么旋转