帮我转移Burt Reynolds Face – jQuery

我有一个问题,jQuery移动Burt Reynolds面对页面。

到目前为止我的代码是:

function moveBurt() { $('.burt').animate('left' : "-=100px", 3000, 'linear'); } 

但这不起作用:(
请帮助我移动暴露雷诺!

怎么样 –

 function moveBurt() { $('.burt').animate({'left' : "-=100px"}, 3000, 'linear'); } 

除了bhalings的回答,我认为你应该删除“px”:

  $('.burt').animate({'left' : "-=100"}, 3000, 'linear'); 

因为JQuery需要做算术。 x.style.left -= 100px是不正确的javascript