function set() { setj = 1; mbe=1; img_box.style.transform = "translate(" + mbe * 600 + "px , 0)" var n = 0; function go() { n++; console.log(n); var setT = setTimeout(go, 1000); if(n === 3) { clearTimeout(setT); if(setj === 1) { img_box.style.transition = "0s"; img_box.style.transform = "translate(-2400px,0)"; if(mbe === 1) mbe = 4; n = 0; time=true; } } } go(); }
2 回答
ExiaGo
TA贡献20条经验 获得超18个赞
object.style.transform="rotate(7deg)" 语法是这样。
img_box.style.transform = "translate(" + mbe * 600 + "px , 0)" 这个应该没有问题吧,"translate(" 字符串,"px,0)" 字符串,中间的mbe*600 才是数字啊。
添加回答
举报
0/150
提交
取消