table的边框是可以合并的,现在有嵌套的table,它们的边框怎么合并?
表格:<body><tableid="table_1"><tr><tdstyle="width:3cm;"class="has-border">00000</td><td...
表格:
<body>
<table id="table_1">
<tr>
<td style="width: 3cm;" class="has-border">00000</td>
<td style="width: 3cm;" class="has-border">11111</td>
</tr>
<tr>
<td class="has-border">22222</td>
<td class="no-border">
<table id="table_2">
<tr>
<td style="width: 1.5cm;" class="has-border">33333</td>
<td style="width: 1.5cm;" class="has-border">44444</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="width: 3cm;" class="has-border">55555</td>
<td style="width: 3cm;" class="has-border">66666</td>
</tr>
</table>
</body> 展开
<body>
<table id="table_1">
<tr>
<td style="width: 3cm;" class="has-border">00000</td>
<td style="width: 3cm;" class="has-border">11111</td>
</tr>
<tr>
<td class="has-border">22222</td>
<td class="no-border">
<table id="table_2">
<tr>
<td style="width: 1.5cm;" class="has-border">33333</td>
<td style="width: 1.5cm;" class="has-border">44444</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="width: 3cm;" class="has-border">55555</td>
<td style="width: 3cm;" class="has-border">66666</td>
</tr>
</table>
</body> 展开
2个回答
展开全部
你不应该嵌套table,应一开始就确定table行与列
追问
样式:
html * {
font-size: 12px;
margin: 0;
padding: 0;
}
body {
color: #505050;
font-family: "宋体", Arial, Helvetica, sans-serif;
}
table {
border-collapse: collapse;
}
td {
height: 25px;
line-height: 20px;
vertical-align: middle;
}
td.has-border {
border: 1px solid #A2B9CA;
}
td.none-border {
border-width: 0;
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询