【发布时间】:2015-02-13 17:32:31
【问题描述】:
我做了一个缓慢的无限CSS3 动画。它的动画从top:0; 到top:40px;。错误是动画结束时,它跳转到起点。我认为它应该与ease 或ease-in 一起跳跃,但这并没有发生。我尝试了很多来解决这个问题,但我失败了。
我需要返回转换来产生ease-in 效果。
我的代码:
span {
margin-left: 200px;
}
/** Down Slow Animation **/
@-webkit-keyframes downSlow {
from { top: 0px; }
to { top: 40px; }
}
@-moz-keyframes downSlow {
from { top: 0px; }
to { top: 40px; }
}
@keyframes downSlow {
from { top: 0px; }
to { top: 40px; }
}
.down-slow {
position: relative;
-webkit-animation: downSlow 1.5s infinite;
-moz-animation: downSlow 1.5s infinite;
animation: downSlow 1.5s infinite;
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" />
<span class="down-slow"><i class="fa fa-angle-down fa-5x"></i></span>
【问题讨论】:
标签: html css animation keyframe