0
問題演變各地jQuery動畫更平滑嗎?
- 這個隨機浮動腳本只允許作步進移動 作爲第一至左邊,然後到頂部,但在完善這將是兩個
- 它並不順利足夠多間
我試圖緩和插件ASLO
代碼是在這裏:
function ran(min, max)
{
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function moveIt()
{
$(".circle").each(function() {
x = ran(-3, 3);
y = ran(-3, 3);
pos = $(this).position();
nowX = pos.left + x;
nowY = pos.top + y;
$(this).animate({"left": nowX}, {queue:false, duration:400, easing: 'linear'});
$(this).animate({"top": nowY}, {queue:false, duration:400, easing: 'linear'});
});
}
setInterval(moveIt, 400);
因此,我們知道你的問題,現在什麼是你的** **的問題? – Bojangles
如何擺脫zigg-zagg運動......這是微小的...但明顯 –
可能重複的[平滑Jquery動畫](http://stackoverflow.com/questions/6323138/smoother-jquery-動畫) – davidcondrey