1. 首页
  2. 数据库
  3. 其它
  4. js动态调用css属性的小规律及实例说明

js动态调用css属性的小规律及实例说明

上传者: 2021-02-01 15:07:10上传 PDF文件 31KB 热度 11次
刚才看到一篇好的文章介绍js调用css属性,( ^_^ )不错嘛!免的自己忘记,总结一下1、对于没有中划线的css属性一般直接使用style.属性名即可。 如: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等。 因为float是Javascrip
下载地址
用户评论