我使用下面的css3代码来动画和旋转我的徽标360度及其工作当前,如何在每360度旋转后暂停动画2秒?
@keyframes logo {
from {transform: rotateY(360deg);}
}
@-webkit-keyframes logo {
from {-webkit-transform: rotateY(360deg);}
}
#logo:first-of-type{
width:120px;
-webkit-animation-name: logo;
-moz-animation-name: logo;
-o-animation-name: logo;
animation-name: logo;
animation:logo 3s infinite;
-webkit-animation:logo 3s infinite;
animation-duration:2s;
-webkit-animation-duration:2s;
animation-delay:2s;
-webkit-animation-delay:2s;
}
Run Code Online (Sandbox Code Playgroud) 我希望.dot在之前的3秒延迟之后为每个设置动画.dot
.这是我使用的代码.但它不起作用.
var time = 3000;
$(".dot").each(function() {
setTimeout(function() {
$(this).addClass("animate");
$(this).find(".num").addClass("animate");
}, time)
time += 3000;
});
Run Code Online (Sandbox Code Playgroud)