我使用 bootstrap 构建网站,在此网站中,我使用了三个引导标签,就像这些http://getbootstrap.com/javascript/#tabs一样。在我的第一个标签中,我有一个动画,随着时间的推移,从上到下剪切和图像。当我在动画运行时按另一个选项卡,然后单击返回动画选项卡,动画为重置时,即使它没有完成,它也会重新开始。我不知道为什么?而且我不希望它像那样。
这是动画代码:) * /
.powerups {
cursor: pointer;
position: relative;
display: inline-block;
width: 60px;
height: 60px;
}
.powerups img {
position:absolute;
}
#p0 {
-webkit-animation: Powertrimm 20s linear paused;
}
@-webkit-keyframes Powertrimm {
from {clip:rect(0px,60px,60px,0px);}
50% {clip:rect(30px,60px,60px,0px);}
to {clip:rect(60px,60px,60px,0px);}
}