Table 单元格重叠变粗 使用border-collapse:collapse; 可以解决。对比的HTML如下:
<style>
.grid
{
border-collapse: collapse;
}
.grid td
{
border: solid 1px #cccccc;
}
.gridNoCollapse td
{
border: solid 1px #cccccc;
}
</style>
不使用border-collapse:collapse;
<table border = "0" cellpadding = "4" cellspacing = "0" width = "200" class = "gridNoCollapse">
<tr style="color:red">
<td>
1.1</td>
<td>
1.2</td>
</tr>
<tr>
<td>
2.1</td>
<td>
2.2</td>
</tr>
</table>
使用border-collapse:collapse;
<table border = "0" cellpadding = "4" cellspacing = "0" width = "200" class = "grid">
<tr>
<td>
1.1</td>
<td>
1.2</td>
</tr>
<tr>
<td>
2.1</td>
<td>
2.2</td>
</tr>
</table>