JS和CSS属性对照表
盒子标签和属性对照
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-in
相关文档:
1.直接加在对象上
<html>
<head>
<title>title</title>
</head>
<body>
<span style="color:red">red</span>
</body>
</html>
2.加到页面头部
<html>
<head>
< ......
id和class到底要用哪一个?
首先要明白id和class的各自的优缺点。这样才能根据他们的各自的特点进行使用。
id的优点(class的缺点):id写在css用"#"选择器,class写在css中用"."选择器。"#"选择器的优先级高于"."选择器大约10倍,所以当你需要提升优先级的时候,id标签,或者id容器内的标签将是很容易和有效的。 ......
今天开始做我们公司内部使用的ITSM系统的静态页面,这个页面好复杂,当然,我是一个才开始做页面的家伙,所以对我来说还有一定的难度。侧栏要折叠,菜单要Js控制,我本来以前是搞编程的,都是直接用人家的页面,css和js都只是会一点皮毛,现在伤到我的心了。
今天还有一个不幸的消息,我竟然挂了一科,大学4年的清白生活啊 ......
<body style="background-color:#000" mce_style="background-color:#000">
<div style="background-color:#fff; width:500px; height:200px; filter:alpha(opacity='50'); opacity:0.5">这个背景是透明的</div>
</body>
/*IE*/
filter:alpha(opacity='50');
/*FF*/   ......
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
padding: 0;
margin: 0;
}
fieldset, img {
border: 0;
}
table {
border-co ......