我想平滑一些 jquery.animate 函数的链接。
这是一个 jsfiddle,我在其中描述了问题: http://jsfiddle.net/xavier_seignard/KTxbb/4/
正如你所看到的,每个动画之间都有一个停顿,即使是线性属性也是如此。
你知道如何平滑它吗?或者其他任何可以解决问题的方法?
问候
最佳答案
您可以更改速度以获得更“精细”的动画,您会看到停止是因为速度太快且尺寸不同而无法覆盖:
function initPage() {
$.each(json, function() {
$("#point").animate({
left: this.x,
top: this.y
},
1000, 'linear');
});
}
关于javascript - 如何平滑 jquery 动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12458237/