var picss = document.querySelector('.picss'); picss.style.left = (-224)+"px" ; function move(z){ var left = parseInt(picss.style.Left)+z if (left <(-896)) { picss.style.left = 0 +'px' } else if (left>0) { picss.style.left = (-896) +'px' } else { picss.style.left = left + 'px' } console.log(picss.style.left) } document.querySelector('.leftarrow').onclick=function(){ move(-224) }
添加回答
举报
0/150
提交
取消