我有几行的表。我希望第1和第3行高度设置为1 px,第2行设置为正常高度。但我的代码无效。
HTML CODE低于
<table border="0">
<tr style="height:2px;" >
<td width="10"><hr></td>
</tr>
<tr style="height:20px;" >
<td width="10">Hello</td>
</tr>
<tr style="height:20px;" >
<td width="10"><hr></td>
</tr>
</table>
有人可以告诉我该怎么做吗?
注意:我不想使用边框,因为我想要某些行,我可能需要也可能不需要行内的水平线。
答案 0 :(得分:12)
将style="padding:0px; margin:0px;"
添加到hr
并将第三个height
的{{1}}更改为tr
你将拥有:
2px