css控制页面的有:1、行内样式2、内嵌式3、链接式4、导入样式
css选择器:1、标记选择器2、类别选择器3、ID选择器
优先级:ID>类>标记
css的文字效果
font-family:字体
font-size:文字大小
color:文字颜色
font-weight:文字粗细
text-decoration:underline 下划线
text-decoration:overline 顶划线
text-decoration:line-through 删除线
字母间距:letter-spacing(默认normal)
对齐方式
text-align:left 左对齐
text-align:right 右对齐
text-align:center 居中对齐
text-align:justify 两端对齐
line-height 行间距
图片边框
border-style:dotted 点划线
border-style:dashed 虚线
border-style:solid 实线
border-color颜色
border-width:宽度
设置网页背景
background-color 背景颜色
background-image:url(xx.jpg) 背景图片
background-repeat:repeat-y 垂直方向重复
background-repeat:repeat-x 水平方向重复
background-repeat:no-repeat 不重复
背景图片位置
background-position:30% 70% 距离左端30%,距离上端70%的位置
background-position:300px 25px 距离左端300px,距离上端25px的位置
background-attachment:fixed 固定背景图片
综合:background:blue url(xx.jpg)no-repeat fixed 5px 10px;
表格样式
<caption></caption> 表格标题
属性:caption-size:bottom;
border:1px solid red; 表格边框
border-collapse:collapse; 边框重叠
th scope="row" 行的表头
th srope="col" 列的表头
超链接
text-decoration:none 去掉超链接下划线
a:link 正常浏览状态的样式
a:visited 被点击过的超链接样式
a:hover 鼠标经过时的样式
a:active 点了那一刻的样式
鼠标经过时手指
a:hover
{
cursor:pointer;
}