kavin

css3动画不循环怎么办 手机一直重启循环开不了机怎么办

kavin web技术 2022-10-21 369浏览 0

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

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

语法

animation-iteration-count: n|infinite;

css3动画不循环怎么办 手机一直重启循环开不了机怎么办

实例

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;}
}




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

效果:

css3动画不循环怎么办 手机一直重启循环开不了机怎么办

继续浏览有关 css教程 的文章
发表评论