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

CSS样式表
面向对象的CSS应用
css 文字按钮实现样式submit按钮以文本的形式显示出来
CSS 选择符的用法和实例
CSS a:hover伪类在IE6下的问题
IE6下CSS定义DIV高度的问题
CSS网页实例 利用box-sizing实现div仿框架结构实现代码
CSS样式表与HTML网页的关系分析
设计稿进行页面制作的流程和注意事项
CSS压缩的技巧与工具
CSS @font-face属性实现在网页中嵌入任意字体
通过css样式控制单元格文本超长省略
运用比较纯的CSS打造很Web2.0的按钮
CSS expression 隔行换色效果
CSS 制作有弹性的日历表
CSS Cookbook创建水平导航菜单
CSS Cookbook 创建文字导航菜单和翻转特效
区别div和span、relative和absolute、display和visibility
让页脚紧贴页面底部的CSS代码
Firefox下div层被Flash遮住的解决方法
ins标签什么时候使用

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


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