【发布时间】:2014-09-03 23:49:55
【问题描述】:
每 80 毫秒,我想将 += 1 添加到 div 的背景 Y 位置。
问题是它不起作用。仅当我将 += 1 添加到 x 位置时它才有效。
我该怎么做?
我的代码:
<script>
$(function(){
setInterval(oneSecondFunction, 80);
});
function oneSecondFunction() {
$( '#grille1' ).css( 'background-position', '0 +=1' );
}
</script>
【问题讨论】:
标签: jquery background-position