日期:2014-05-17 浏览次数:20862 次
ul,li {
/*清除ul,li默认的小原点*/
list-style:none;
}
ul {
/*清除ul的缩近值,只对padding设置在IE6与IE7中并不好使还需要设置margin*/
padding:0;
margin: 0;
}
/*设置class需要加.*/
.main, .hmain {
/*添加背景图片,背景图片会覆盖li的背景色*/
background-image: url(../images/title.gif);
/*只在横向尽量重复*/
background-repeat: repeat-x;
width: 120px;
margin-top: 1px;
}
/*设置所有li的背景色*/
li {
background-color: #EEEEEE;
}
a {
/*取消链接的所有划线*/
text-decoration: none;
padding-left: 20px;
/*使链接充满整个区并显示小手样式,但在IE6中还是有问题需要再设置display: inline-block;*/
display: block;
/*display: inline-block;并不是符合CSS标准*/
display: inline-block;
/*各个链接之间拉开些距离*/
padding-top: 3px;
padding-bottom: 3px;
}
/*设置main下链接的字体为白色*/
.main a, .hmain a {
color: white;
background-image: url(../images/collapsed.gif);
background-repeat: no-repeat;
/*前景距X轴左边有3像素 居中*/
background-position: 3px center;
}
/*设置main li 下链接的字体为黑色*/
.main li a, .hmain