使用.animate在地图的图片周围移动红色css圈。在第五个动画之后,jquery.animate停止工作。我可以使用的金额有限制吗?您可以使用的.animate()的数量是否有限制
function doAnimate() {
$("#animate").css({top: "510px", left: "950px"})
.animate({top: "470px", left: "955px"}, 1500)
.animate({top: "470px", left: "1050px"}, 1500)
.animate({top: "370px", left: "1047px"}, 1500)
.animate({top: "370px", left: "865px"}, 1500)
.animate({top: "310px", left: "895x"}, 1500)
.animate({top: "310px", left: "865x"}, 1500);
};
doAnimate();
setInterval(doAnimate, 9100);
最后一个.animate命令不会工作,但其他5个ontop就可以。为什么5 .animate之后停止工作?
不,没有限制。作为一个方面说明,如果它是相同的值,则不需要再次设置“top”。你的第二个动画CSS可以修改'left'。 –