设为首页 加入收藏

TOP

JAVASCRIPT中修改CSS
2014-11-13 23:34:57 】 浏览:1910
Tags:JAVASCRIPT 修改 CSS

  1.js修改单个元素的css属性


  document.getElementByIdx('obj').className=”…”,


  document.getElementByIdx('obj').style.backgroundColor=”#003366″ ,


  2.js修改整个页面的css属性


  


  


  3.js和css的style属性对照表


  盒子标签和属性对照


  CSS语法 (不区分大小写) java script语法 (区分大小写)


  border border


  border-bottom borderBottom


  border-bottom-color borderBottomColor


  border-bottom-style borderBottomStyle


  border-bottom-width borderBottomWidth


  border-color borderColor


  border-left borderLeft


  border-left-color borderLeftColor


  border-left-style borderLeftStyle


  border-left-width borderLeftWidth


  border-right borderRight


  border-right-color borderRightColor


  border-right-style borderRightStyle


  border-right-width borderRightWidth


  border-style borderStyle


  border-top borderTop


  border-top-color borderTopColor


  border-top-style borderTopStyle


  border-top-width borderTopWidth


  border-width borderWidth


  clear clear


  float floatStyle


  margin margin


  margin-bottom marginBottom


  margin-left marginLeft


  margin-right marginRight


  margin-top marginTop


  padding padding


  padding-bottom paddingBottom


  padding-left paddingLeft


  padding-right paddingRight


  padding-top paddingTop


  颜色和背景标签和属性对照


  CSS语法 (不区分大小写) java script语法 (区分大小写)


  background background


  background-attachment backgroundAttachment


  background-color backgroundColor


  background-image backgroundImage


  background-position backgroundPosition


  background-repeat backgroundRepeat


  color color


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇hibernate关系映射 下一篇关于计算Java程序运行时间

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目