更新时间:2023-02-10 18:49:45
从1.6开始,您可以使用便捷的方法:
From 1.6 onwards, you can use the convenient:
$('#myelem').css('left','-=8px')
如果由于某种奇怪的原因而被困在过去,请使用:
If for some strange reason you are stuck in the past, use:
$('#myelem').css('left', function(i,v) {
return v - 8;
});
对于jQuery 1.4及更高版本.
for jQuery 1.4 up.