js调用CSS属性编写

1,对于没有中间线的CSS属性,样式。属性名称通常是直接使用的。
如:obj.style.margin,obj.style.width,obj.style.left,obj.style.position等等。

2。对于具有中间行的CSS属性,删除每一行中间行,并在每行之后更改第一个字符以大写。
如:obj.style.margintop,obj.style.borderleftwidth,obj.style.zindex,obj.style.fontfamily等等。

因为浮球是一个保留字的Javascript,你如何在JS样式表写浮
我们不能直接使用obj.style.float,所以操作是无效的。

使用正确的方法是:即:obj.style.stylefloat,其他浏览器Mozilla(壁虎),FF,等等stylefloat:obj.style.cssfloat。