当前位置: 首页 > 图文教程 > 网页制作 > CSS样式表 > JavaScript CSS Style属性对照表

CSS样式表
网页设计关于WEB标准的相关问题汇总
项目管理:交互-设计-制作三个角色的组合
学习CSS制作网页总结的一些经验
多个CSS样式表争夺特定选择符的控制权
网页设计制作CSS实现隔行换色两种方法
CSS教程:DIV底部放置文字
CSS教程:CSS命名参考
CSS教程:控制网页文件大小通过精简CSS实现
CSS教程:关于文字溢出问题的研究
符合web标准的嵌入Flash的方法
学习WEB标准必备的四项技能
CSS对表格单元格强制换行和不换行
CSS制作符合网站标准的细线表格
区分IE6,IE7和firefox的CSS hack
CSS教程:学习CSS的继承性
CSS教程:CSS兼容的技巧
CSS教程:浮动元素对浏览器的支持
闭合浮动元素让CSS代码更规范
深入分析网页CSS隐藏文字和以图换字技术
看懂《CSS hack浏览器兼容一览表》

CSS样式表 中的 JavaScript CSS Style属性对照表


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-20   浏览: 342 ::
收藏到网摘: n/a

比如:鼠标经过一个图片时我们让图片加一个边框,代码可能是这样:

JavaScript代码

复制代码
代码如下:

<script type="text/javascript">   
    function imageOver(e) {   
        e.style.border="1px solid red";   
    }   
    function imageOut(e) {   
        e.style.borderWidth=0;   
    }   
</script>   
<img src="phplamp.gif" onmouseover="imageOver(this)" onmouseout="imageOut(this)" />  

JavaScript中style后面的属性应该是什么?
JavaScript CSS Style属性对照表
盒子标签和属性对照
CSS语法 (不区分大小写) JavaScript语法 (区分大小写)
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语法 (不区分大小写) JavaScript语法 (区分大小写)
background background
background-attachment backgroundAttachment
background-color backgroundColor
background-image backgroundImage
background-position backgroundPosition
background-repeat backgroundRepeat
color color
 
样式标签和属性对照
CSS语法 (不区分大小写) JavaScript语法 (区分大小写)
display display
list-style-type listStyleType
list-style-image listStyleImage
list-style-position listStylePosition
list-style listStyle
white-space whiteSpace
 
文字样式标签和属性对照
CSS语法 (不区分大小写) JavaScript语法 (区分大小写)
font font
font-family fontFamily
font-size fontSize
font-style fontStyle
font-variant fontVariant
font-weight fontWeight
 
文本标签和属性对照
CSS语法 (不区分大小写) JavaScript语法 (区分大小写)
letter-spacing letterSpacing
line-break lineBreak
line-height lineHeight
text-align textAlign
text-decoration textDecoration
text-indent textIndent
text-justify textJustify
text-transform textTransform
vertical-align verticalAlign