htmltable中的某列分为两行怎么弄,有图
发布网友
发布时间:2022-04-21 22:22
我来回答
共1个回答
热心网友
时间:2023-12-16 21:35
合并单元格即可,代码如下,已经测试通过:
<!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/html; charset=GB2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
body {
font-size: 12px;
text-align: center;
}
table {
background-color: #cccccc;
}
td {
height: 24px;
background-color: #ffffff;
}
-->
</style>
</head>
<body>
<table width="500" border="0" cellpadding="0" cellspacing="1">
<tr>
<td rowspan="2">周次</td>
<td rowspan="2">日期</td>
<td colspan="2">值班人员</td>
<td rowspan="2">值班电话</td>
<td rowspan="2">值班地点</td>
</tr>
<tr>
<td>带班领导</td>
<td>值班人</td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>