文字“Big”上方和下方的空间仍然存在。这是html。我正在使用 Chrome:
<table border="0" style="border-collapse: collapse" cellspacing="0" cellpadding="0">
<tr>
<td style="border-collapse: collapse; padding:0;background-color:red; font-family: calibri light; font-size:70px; vertical-align: top; padding:0px !important;">
BIG
</td>
</tr>
<tr>
<td style="padding-left:5px; font-family: calibri; font-size:20px; float: left; ">
Small text
</td>
</tr>
</table>
我不想使用 line-height
因为这样我必须确保 td
及其内容都有正确的高度。如果没有,就会发生这种情况。这就是我不使用 div 的原因:
<table>
<tr>
<td style="line-height:30px;border-collapse: collapse; padding:0;background-color:red; font-family: calibri light; font-size:70px; vertical-align: top; padding:0px !important;">
text
</td>
</tr>
</table>
最佳答案
关于html - 无法删除表格单元格中的空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47115332/