border-collapse: collapse //相邻边被合并
background-color: #cccccc//设置表格背景色
border-top: 1px solid #000000 //设置表格上边框颜色
border-left: 1px solid #000000 //设置表格左边框颜色
border-right: 1px solid #000000 //设置表格右边框颜色
border-bottom: 1px solid #000000 //设置表格下边框颜色
}
td {
border-right: 1px solid #000000 //设置td颜色
border-bottom: 1px solid #000000 //
}
表格制作练习可以到实战帮。
<tr><td>01</td>
<td>02</td>
<td>03</td>
<tr>
<tr>
<td>001</td>
<td>002</td>
<td>003</td>
<tr>
你看没一行的第一个td都是要设置为3cm的,那你就给没一个需要设置为3cm的加一个类名
其他的是另外一个类名,这样就可以设置啦。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/htmlcharset=utf-8" />
<title>无标题文档</title>
<style>
.table { border:#30C 1pxborder-style: solidheight:30pxmargin-top:-1px}
</style>
</head>
<body>
<div class="table"></div>
<div class="table"></div>
<div class="table"></div>
<div class="table"></div>
<div class="table"></div>
<div class="table"></div>
</body>
</html>
就这样 多列的表格 需要调整布局 这个 调整调整就能实现