我是靠谱客的博主 标致星星,这篇文章主要介绍css3动画不循环怎么办,现在分享给大家,希望可以做个参考。

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

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

语法

animation-iteration-count: n|infinite;
登录后复制

L}}4Q41OIKC{D_VSBJ4R9HU.png

实例

<!DOCTYPE html>
<html>
<head>
<style> 
div
{
width:100px;
height:100px;
background:red;
position:relative;
animation:mymove 3s;
animation-iteration-count:3;

/* Safari and Chrome */
-webkit-animation:mymove 3s;
-webkit-animation-iteration-count:3;
}

@keyframes mymove
{
from {top:0px;}
to {top:200px;}
}

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

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

<div></div>

</body>
</html>
登录后复制

效果:

GIF.gif

推荐学习:css视频教程

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

最后

以上就是标致星星最近收集整理的关于css3动画不循环怎么办的全部内容,更多相关css3动画不循环怎么办内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(128)

评论列表共有 0 条评论

立即
投稿
返回
顶部