js切換底圖位置的動畫

//i爲圖片數,l爲一張圖片高度(function(i,l){    var j=1;    setInterval(function(){        if(j<i){            $(".transform-test").css({"background-position":"0 -"+(j*l)+"px"});            j++;        }else{            j=0;        }    },1000);})(4,500);
相關文章
相關標籤/搜索