a { //定义所有链接(a)的样式
color: #000; //定义文本颜色:黑色
text-decoration: none; //定义下划线样式为:不显示
}
body { //定义body样式,所有body内元素都继承body的样式
background: #CCC url(img/bg.gif) repeat-y fixed bottom center;
//定义背景:灰色 背景图片url地址 横向平铺 背景固定 背景图片位于最下居中
color: #333; margin: 20px 0;
//定义颜色 //定义外边距:上下边距20px 左右边距0
text-align: center; font: normal 0.6em sans-serif,Arial;
//定义文本格式:居中 //定义字体样式:正常(对应加粗、斜体等) 标准字体的0.6倍大小 字库为sans-serif,Arial
//标准字体单位 em的大小根字库有关
}
.gfx a { //定义样式为gfx内的链接(a):形如
这样的结构,对内部的a有效
background: #F5F5F5 url(img/bright_pixel.gif) no-repeat;
//定义背景
display: block; height: 240px;
//定义显示类型:块级 //定义高度为240像素
}
.header { //定义class=header的元素的样式
background: #FFF; //定义背景
border-bottom: 1px solid #E5E5E5; //定义下边框样式:一像素宽,实线,颜色为#E5E5E5
font: bold 2.6em Arial; //定义字体:加粗,2.6倍大小,字库Arial
line-height: 3em; //定义行高:3倍正常字体高度
}
.main { //定义class=main的元素的样式
background: #FFF; //背景
border: 3px double #EEE; //定义边框:3像素宽,双线,灰色
border-color: #E4E4E4 #CFCFCF #CCC #CFCFCF; //定义边框颜色,顺序依次为上、右、下、左
margin: 20px auto 4px auto; //定义外边距,顺序同上
text-align: left; //定义文本格式:靠左
width: 620px; //定义宽度
}
.menu a { //定义class=menu的元素中的链接Link元素(a)
background: #EEE; //背景
border-right: 1px solid #CECECE; //右边框
border-top: 1px solid #E5E5E5; //上边框
color: #888; //颜色
float: left; //设置漂浮:靠左漂浮
padding-top: 4px; //上内边距4像素
width: 149px; height: 36px; //定义宽和高
}
.menu a span { //定义class=menu元素内的a元素内的span元素
padding-left: 6px; //定义左内边距为6像素
}
.menu a:hover { //定义class=menu元素内的链接元素当鼠标移动上去的样式
//继承.menu a的定义,:hover为伪类,用于标示鼠标移动上去的样式
background: #EEE url(img/bgmenu.gif) repeat-x; //定义背景
color: #555; //颜色
}
.menu a#last { //定义class=menu元素内的id=last的a元素(链接)
width: 150px; //宽度
border-right: none; //右边框为0
}
.container { //定义class=container元素
margin: 10px; //设置外边距
}
.content { //定义class=content的元素
background: #F5F5F5; //背景
border-top: 1px solid #E5E5E5; //上边框
clear: both; //设置浮动清除:清除两边的浮动对象
}
.content h1 { //定义class=content元素内的h1元素(标题)
margin: 0; //外边距
font: bold 1.1em sans-serif,Arial; //字体
color: #666; //颜色
}
.content p { //定义class=content元素内的p元素(段落)
margin: 3px 0 6px; //外边距
color: #666; //颜色
}
.item { //定义class=item的元素
background: #FCFCFC url(img/bgitem.gif) repeat-x; //背景
padding: 10px; //设置内边距
}
.footer { //设置class=footer的元素
padding: 5px; //内边距
background: #F5F5F5; //背景
color: #666; //颜色
}
==还有不懂的,hi我==