y * 100 是数字,肯定不生效啊,要加单位‘px’
document.getElementById('car1').style.left = y * 100;
可是为啥这样就可以动起来
???你确定
都没给单位,你可以在浏览器试下,不给单位,css生效不