css html 表格_css3

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<!-- 使用内嵌的方式编写页面样式 -->
<style>

ul{
padding: 0;
margin: 0;
list-style-type:none;
width: 450px;
border-top: solid 1px #ccc;
border-left:solid 1px #ccc;
margin: 0 auto;
}
ul li{
overflow: hidden;
}
/* 如果span是浮动的,也可以控制自己的宽度 */
ul li span{
float: left;
height: 23px;
border-bottom: solid 1px #ccc;
border-right:solid 1px #ccc;
}
ul li:nth-child(1){
text-align: center;
}
ul li span:nth-child(1){
text-align: center;
width: 99px;
}
ul li span:nth-child(2){
width: 146px;
padding-left:3px;
}
ul li span:nth-child(3){
text-align: center;
width: 99px;
}
ul li span:nth-child(4){
text-align: center;
width: 99px;
}
</style>
</head>
<body>
<!-- 1.添加页面元素
2.为页面元素添加样式
3.微调和优化代码 -->
<ul>
<li>
<span>序号</span>
<span>新闻标题</span>
<span>媒体</span>
<span>时间</span>
</li>
<li>
<span>1</span>
<span><a href="">取像素值</a></span>
<span></span>
<span>08-20 16:30</span>
</li>
<li>
<span></span>
<span></span>
<span></span>
<span></span>
</li>
<li>
<span></span>
<span></span>
<span></span>
<span></span>
</li>
<li>
<span></span>
<span></span>
<span></span>
<span></span>
</li>
<li>
<span></span>
<span></span>
<span></span>
<span></span>
</li>
<li>
<span></span>
<span></span>
<span></span>
<span></span>
</li>
<li>
<span></span>
<span></span>
<span></span>
<span></span>
</li>
<li>
<span></span>
<span></span>
<span></span>
<span></span>
</li>
<li>
<span></span>
<span></span>
<span></span>
<span></span>
</li>
<li>
<span></span>
<span></span>
<span></span>
<span></span>
</li>
</ul>
</body>
</html>