index.html:
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>CSS表格和列表</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<table border="1">
<caption>人员档案</caption>
<tr>
<th>姓名</th>
<th>性别</th>
<th>年龄</th>
</tr>
<tr>
<td>张三,是一个好青年</td>
<td class="sex">男</td>
<td></td>
</tr>
<tr>
<td>李四</td>
<td>女</td>
<td>35</td>
</tr>
<tr>
<td>王五</td>
<td>男</td>
<td>36</td>
</tr>
</table>
<ul>
<li>张三,是一个好青年</li>
<li>李四<b>2</b></li>
<li>王五</li>
</ul>
<div><span>我是HTML5</span></div>
<em>内容简介:</em><textarea rows="10" cols="20"></textarea>
</body>
</html>
style.css:
@charset "utf-8";
table{
width:400px;
height: 300px;
text-align: center;
/* border-collapse: separate;
border-collapse: collapse;*/
/*border-spacing: 10px;*/
/* caption-side: bottom;*/
/*empty-cells: hide;*/
/*table-layout: fixed;*/
border: 1px solid red;
}
table tr th,table tr td{
border:1px solid red ;
}
ul{
/* list-style-type: square;
width: 120px;
list-style-position: inside;
list-style-image: url(1.PNG);*/
list-style: square inside url(1.PNG)
}
.sex{
/*vertical-align: bottom;*/
}
b{
vertical-align: super;
}
div{
width: 300px;
height: 300px;
background: silver;
text-align: center;
}
div span{
background: green;
vertical-align: -100px;
vertical-align: -100%;
}
em{
vertical-align: 140px;
}
ppt
表格::
列表:
其他功能: