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

CSS样式表
跨浏览器的CSS3产生器:CSS3 please
YUICompressor:高效压缩CSS和JS代码的工具
收集国外47个令人瞠目结舌的CSS3动画演示
CSS教程:通配属性批量替换的方法
清理无用的CSS样式比较有用的几个工具
页面元素的对齐:阅读线路不清晰
15个滑动门效果CSS网页导航菜单设计教程
网页制作教程:弹出层详解
SEO实战:网页排名效果最好的标题写法
提高网站权重:提高网站PR和提高网站更新度
兼容浏览器的网页细线表格设计
CSS教程:CSS3新功能和新特性
CSS3模块的目前的状况
ie6普及的大环境下暂时不要考虑w3c标准
CSS技巧教程:让CSS代码更具有易维护性
控制first-letter伪类的背景

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-20   浏览: 325 ::
收藏到网摘: 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