■ 两级表头
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>两级表头</title>
<style type="text/css">
td,
th {
font-style: normal;
font-weight: normal;
text-align: center;
}
tr {
height: 48px;
}
.firstHead th {
font-size: 14px;
font-weight: bold;
}
.secondHead th {
font-size: 13px;
font-weight: bold;
}
table {
border-collapse: collapse;
border-color: #D8DFE6;
}
table thead {
background: #F3FDFF;
}
</style>
</head>
<body>
<div class="table">
<table border="1" width="100%">
<colgroup>
<col style="width: 150px;" />
<col style="width: 50px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr class="firstHead">
<th rowspan="2" colspan="1">
项目
</th>
<th rowspan="2" colspan="1">
行次
</th>
<th rowspan="1" colspan="3">
平均资金占用额
</th>
<th rowspan="1" colspan="3">
投资收益
</th>
<th rowspan="1" colspan="2">
投资回报率
</th>
</tr>
<tr class="secondHead">
<th> 上年数 </th>
<th> 本年预算数 </th>
<th> 增长率 </th>
<th> 上年数 </th>
<th> 本年预算数 </th>
<th> 增长率 </th>
<th> 上年数 </th>
<th> 本年预算数 </th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
效果图:
■ 三级表头
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>三级表头</title>
<style type="text/css">
td,
th {
font-style: normal;
font-weight: normal;
text-align: center;
}
tr {
height: 48px;
}
.firstHead th,
.secondHead th,
.thirdHead th {
font-size: 14px;
font-weight: bold;
}
table {
border: none;
border-collapse: collapse;
border-color: #D8DFE6;
}
table thead {
background: #F3FDFF;
}
table tbody tr {
height: 50px;
}
</style>
</head>
<body>
<body>
<div class="table">
<table border="1" width="100%">
<colgroup>
<col style="width: 50px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
<col style="width: 100px;" />
</colgroup>
<thead>
<tr class="firstHead">
<th rowspan="3"> 序号 </th>
<th rowspan="3"> 项目名称 </th>
<th rowspan="3"> 自有资金 </th>
<th rowspan="1" colspan="6"> 本年计划投资额 </th>
<th rowspan="3"> 备注 </th>
</tr>
<tr class="secondHead">
<th rowspan="3"> 合计 </th>
<th colspan="3"> 其中: </th>
<th colspan="2"> 其中: </th>
</tr>
<tr class="thirdHead">
<th> 自有资金 </th>
<th> 对外贷款 </th>
<th> 其他 </th>
<th> 主业 </th>
<th> 非主业 </th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</body>
</body>
</html>
■ 四级表头
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>四级表头</title>
<style type="text/css">
td,
th {
font-style: normal;
font-weight: normal;
text-align: center;
}
tr {
height: 48px;
}
.firstHead,
.secondHead,
.thirdHead {
height: 42px;
}
.fourthHead {
height: 64px;
}
.firstHead th {
font-size: 15px;
font-weight: bold;
}
table {
border: none;
border-collapse: collapse;
border-color: #D8DFE6;
}
table thead {
background: #F3FDFF;
}
table tbody td {
width: 6.3%;
}
table tbody tr {
height: 50px;
}
</style>
</head>
<body>
<div class="table">
<table border="1" width="100%">
<thead>
<tr class="firstHead">
<th colspan="1" rowspan="5" width="4%">序号</th>
<th colspan="1" rowspan="5" width="6.4%">终端使用人</th>
<th colspan="11">工作开展情况</th>
</tr>
<tr class="secondHead">
<th colspan="1" rowspan="4">工作量总计</th>
<th colspan="6">采集情况</th>
<th colspan="4">检查情况</th>
</tr>
<tr class="thirdHead">
<th colspan="3" rowspan="1">人口</th>
<th colspan="3" rowspan="1">房屋</th>
<th colspan="4" rowspan="1">房屋隐患</th>
</tr>
<tr class="fourthHead">
<th>总数</th>
<th>户籍</th>
<th>流动</th>
<th>总数</th>
<th>机动车</th>
<th>非机动车</th>
<th>总数</th>
<th>生活安全</th>
<th>出租管理</th>
<th>房屋功能</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</body>
</html>