firefox中的CSS动画循环
我有一个网页上的动画元素,是旋转一次,然后停止 这在chrome/ie中运行良好,但在firefox中循环是无限的firefox中的CSS动画循环,css,firefox,Css,Firefox,我有一个网页上的动画元素,是旋转一次,然后停止 这在chrome/ie中运行良好,但在firefox中循环是无限的 -webkit-animation:.75s rotateLast ease; -webkit-animation-fill-mode:forwards; -moz-animation:.75s rotateLast ease; -moz-animation-fill-mode:forwards; animation:.75s rotateLast ease; animation-
-webkit-animation:.75s rotateLast ease;
-webkit-animation-fill-mode:forwards;
-moz-animation:.75s rotateLast ease;
-moz-animation-fill-mode:forwards;
animation:.75s rotateLast ease;
animation-fill-mode:forwards;
有人能看出我做错了什么吗?或者有人以前有过这样的经历吗
@-webkit-keyframes rotateFirst {
0% {-webkit-transform:rotate(180deg);}
100% {-webkit-transform:rotate(0deg);opacity:1}
}
@-webkit-keyframes rotateLast {
0% {-webkit-transform:rotate(-180deg);}
100% {-webkit-transform:rotate(0deg);opacity:1}
}
@keyframes rotateFirst {
0% {transform:rotate(180deg);}
100% {transform:rotate(0deg);opacity:1}
}
@keyframes rotateLast {
0% {transform:rotate(-180deg);}
100% {transform:rotate(0deg);opacity:1}
}
@-moz-keyframes rotateFirst {
0% {transform:rotate(180deg);}
100% {transform:rotate(0deg);opacity:1}
}
@-moz-keyframes rotateLast {
0% {transform:rotate(-180deg);}
100% {transform:rotate(0deg);opacity:1}
}
加:
动画迭代计数CSS属性定义次数
停止前应播放动画循环
谢谢@SW4,它仍然在循环。你能提供一个jsfiddle.net吗?
animation-iteration-count:1;
-moz-animation-iteration-count:1;
-webkit-animation-iteration-count:1;