常用Css样式
/*标题元素*/
h1,h2,h3,h4,h5,h6 {
color: green;
}
/*父元素继承*/
body {
font-family: Verdana, sans-serif;
}
/*id 选择器*/
#red {color:red;}
/*id 选择器和派生选择器*/
#red p {
font-style: italic;
text-align: right;
margin-top: 0.5em;
}
/*类选择器*/
.center {text-align: center}
/*属性*/
/*背景*/
background-color: gray;
background-image:url(../image/topmiddle.jpg);
background-repeat:no-repeat;
/*文字*/
text-align:left;
font-size:11px;
font-family:黑体;
line-height:25px;*行间距*/
text-indent:16px;/*文字缩近*/
letter-spacing ;/*文字之间的间隔*/
word-spacing ;/*单词之间的间隔*/
/*外边距*/
margin-top:5px;
/*内边距*/
padding-bottom:30px;
/*边框*/
border-color:#e1e0e0;
border-style:solid;
border-width:0px 1px 1px 1px;
/*浮动*/
float: left;
/*绝对定位*/
#box_relative {
position: absolute;
left: 30px;
top: 20px;
}
/*相对定位*/
#box_relative {
position: relative;
left: 30px;
top: 20px;
}
相关文档:
盒子标签和属性对照
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 ......
.
Transparent
{
width
: 16px
;
height
: 42px
;
background
: transparent
url(images/transparent.png)
no-repeat
;
}
*
html
.
Transparent
{
&nbs ......
1. document.formName.item("itemName") 问题
说明:IE下,可以使用document.formName.item("itemName")或document.formName.elements["elementName"];
Firefox下,只能使用document.formName.elements["elementName"].
解决方法:统一使用document.formName.elements["elementName"].
2.集合类对象问题
说明:IE下,可 ......
网页切图过程中div+css命名规则
内容:content/container 导航:nav 侧栏:sidebar
栏目:column 标志:logo 页面主体:main
广告:banner 热点:hot 新闻:news
下载:download 子导航:subnav 菜单:menu
搜索:search 页脚:footer 滚动:scroll
版权:copyright 友情链接:friendlink 子菜单:sub ......
一、css优先于位置也有关系
.vm与.vb 样式的定义在优先级别上是相同的,但是如果在html属性里class="vm vb"定义的话优先级并不是写在属性里的顺序,而是写在样式里顺序来决定的。如下的例子
<mce:style><!--
.vm{vertical-align:middle} /* 由于位置原因优先于vb*/
.vb{vertical-align:baseline}
--> ......