我有一个动画,我想让动画在所有过渡上做同样的动作,在我有动画开始的时候,几乎在最后开始变慢。
#tableNews {
overflow: hidden;
margin-right: 5%;
width:90%;
position: relative;
-webkit-animation: mymove 15s infinite; /* Chrome, Safari, Opera */
animation: mymove 15s infinite;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes mymove {
from {top: 60px;}
to {top: -200px;}
}
@keyframes mymove {
from {top: 60px;}
to {top: -200px;}
}Run Code Online (Sandbox Code Playgroud)
<table id="tableNews" class="TableList" border="0" width="100%" style="overflow:hidden;">
<tbody>
<tr class="new-separator">
<td>
<table>
<tr>
<td><a href="#"></a><hr></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>Run Code Online (Sandbox Code Playgroud)
我猜它正在制作一个ease. 如果您提供一个选项linear,即动画的计时功能,则该选项会以恒定速度运行且无延迟。让我们这样做:
#tableNews {
overflow: hidden;
margin-right: 5%;
width:90%;
position: relative;
-webkit-animation: mymove 15s linear infinite; /* Chrome, Safari, Opera */
animation: mymove 15s linear infinite;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes mymove {
from {top: 60px;}
to {top: -200px;}
}
@keyframes mymove {
from {top: 60px;}
to {top: -200px;}
}Run Code Online (Sandbox Code Playgroud)
<div id="tableNews">Hi</div>Run Code Online (Sandbox Code Playgroud)