文档介绍:页眉内容
: .
1. css引用方式:
① 内联式
<style>
div{ color:red;
}
</style>
② 行内式
<div style二"color:gree n">
③ 外联式
<li nk href二"css/cssl・css" rel二"stylesheet"〉
④ import方式
vstyle>
***@import url("css/");
</style>
:
vlink href二〃css/cssl・css" rel二"stylesheet"〉
返回上一级目录
页眉内容
页眉内容
绝对路径:
vlink href二〃E:/web Test-43/css/cssl・css"
3 •表格:
cols pan 歹U合并
rows pan彳丁合并
cells pacing
rel="stylesheet">
单元格间距
页眉内容
页眉内容
<table cells pacin g=,,0,z></table>
<tr>
行一〉
<td cols pan=/z2/z>alv/1dx!--
</tr>
<tr>
<td rows pan二"2">blv/tdx!-一 </tr>
①固定表格布局
table{
table-layout:fixed;}
表格边框合并为单一边框
②如何让表格边框为IPX 方法1:用边框的上下左右调整 方 法2: border-collapse:collapse
页眉内容
页眉内容
默认:
separate
<style>
table{
border-colla pse:colla pse;
v/style>
③列间隔行间隔:
border-spacing border-s pacin g:10 px 5px;
④文字水平对齐
text-align 一一 left center right table{ text-alig n:ce nter; }
⑤空单元格 empty-cells:hide
table{ emp ty-cells:hide; }
隐藏空单元格Show显示空单元格
⑥表格居中
table{ marg in: auto; }
⑦垂直对齐
vertical-align 一一 top middle bottom table tr td{
vertical-alig n:t op; }
4•圆角问题: radius:;
border-bottom-left-radius:; border-bottom-right-radius:; border-to pTeft-
border-t op-right-radius:; border-radius: lOpx Opx Opx lOpx;
:hover--鼠标悬停 table tr:hover{
backgro un d-color: blue; }--彳亍苧 table tr td:hover{
backgro un d-color: blue;
}—每个表格悬停
table tr th:hover{
页眉内容
页眉内容
backgro un d-color:red;
}—表头悬停 v!--th—> <tr>
<th>tl</th>
<th>t2</th>
<th>t3</th> </tr> <table class^tr>
<tr><td>
<table class二"t2"> <tr>
<td></td>
</tr>
</table>
</td></tr>
</table>
&透明度:
・ un ame:hover{
backgro un d-color: red; op acity: ;
9伟占• s八、、八、、•
・ p wd:focus{
backgro un d-color: gree n;
width: 300px;
}