在javascript中更改CSS"left"属性在IE中无效

use*_*426 3 html javascript css internet-explorer css3

我试图改变divjavascript 的位置,这是我的代码

document.getElementById("big").style.left = "-310";
Run Code Online (Sandbox Code Playgroud)

但这不适用于IE,帮助!

pot*_*hin 6

您应该为您的值添加单位.

像素一样:

document.getElementById("big").style.left="-310px";
Run Code Online (Sandbox Code Playgroud)