1
這裏是線性動畫去「A」到「B」目的地http://jsfiddle.net/BL5cS/通過多個航點/目的地爲對象設置動畫效果?
如何添加另一條路徑,從而框將動畫像「A」到「B」到「C」到「d」等:
EXP:http://thesaurus.maths.org/mmkb/media/png/Zigzag.png
這裏是線性動畫去「A」到「B」目的地http://jsfiddle.net/BL5cS/通過多個航點/目的地爲對象設置動畫效果?
如何添加另一條路徑,從而框將動畫像「A」到「B」到「C」到「d」等:
EXP:http://thesaurus.maths.org/mmkb/media/png/Zigzag.png
鏈的動畫:
$('.my_element').animate(...first destination...)
.animate(...second destination...)
.animate(...third destination...)
.animate(...fourth destination...)
您還可以將目的地存儲在數組中,並循環播放。
var destinations = [
{top:..., left:...},
{top:..., left:...},
{top:..., left:...},
{top:..., left:...}
],
element = $('.my_element');
$.each(destinations, function(i, v) {
element.animate(v)
});
Here's your code重做了一下。
thx用於編輯標題 – test 2012-04-10 19:26:53