当我使用尺寸大于〜25px的按钮并且行之间没有空格时,我发现的所有解决方案都会有所帮助。但是,当我尝试使用尺寸较小(如18 px)的行之间的按钮时,会出现。到目前为止,仅有余量:-px帮助我减少了一些空格。
<table cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; border-spacing: 0; display: block;">
<tr style="padding: 0;">
<td style="padding: 0;">
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
</td>
</tr>
<tr style="padding: 0;">
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
</tr>
<tr style="padding: 0;">
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
</tr>
<tr style="padding: 0;">
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
</tr>
</table>
答案 0 :(得分:1)
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Untitled</title>
<style>td {line-height: 18px;}</style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; border-spacing: 0; display: block;">
<tr style="padding: 0;">
<td style="padding: 0;">
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
</td>
</tr>
<tr style="padding: 0;">
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
</tr>
<tr style="padding: 0;">
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
</tr>
<tr style="padding: 0;">
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
<td style="padding: 0;">
<button style="background-color:blue; width: 18px; height: 18px; border: 0; margin-top: -16px; margin-bottom: -16px; font-size: 0pt;" />
</td>
</tr>
</table>
</body>
</html>