表格的行高度为1个像素的问题
今天碰到以个奇怪的问题table的行高度设为一个像素的时候不起作用,后请教美工才知道原来在设为一个像素后在单元格力不能有任何的东西,包括空格。而我的就是有一个空格
<table>
<tr>
<td height=1 background='./image/1.jpg'> </td>
<td height=1></td>
<td height=1></td>
</tr>
</table>
因为<td height=1 background='./image/1.jpg'> </td>中间有一个空格所以的不到效果,正确的做法应该是
<table>
<tr>
<td height=1 background='./image/1.jpg'></td>
<td height=1></td>
<td height=1></td>
</tr>
</table>
仔细想想,空格也是一个字符,估计有空格的时候它按照字符的高度来显示了
posted on 2014-02-22 22:41 ExplorerMan 阅读(224) 评论(0) 编辑 收藏 举报