无法删除数字(td)与背景红色td之间的td之间的空格
https://jsfiddle.net/297zgLon/
我尝试使用建议的css方法进行操作,即
CSS
border-collapse:collapse;border-spacing:0px;
HTML
<table style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-spacing: 0;border-collapse: collapse;width:100%;text-align: left;border: 0px;border-collapse:collapse;border-spacing:0px;" width="100%" align="left" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr align="left">
<td align="right" width="43" class="sectionCount" style="width: 43px; display: inline-block; font-size: 24px;color: #177fff; text-align: right; font-weight: 600; font-family:'Open Sans', sans-serif, Arial;"> 1.</td>
<td align="left" width="20" style="width: 20px;font-size: 14px;background:red"> </td>
<td align="left"> <a href="http://mylink" target="_blank" style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;display: inline-block;font-size: 18px;font-weight: 600; font-family:'Open Sans', sans-serif, Arial;color: #177fff;text-decoration: none"> TEST CASE 1 </a> </td>
</tr>
<tr align="left">
<td colspan="3" style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;mso-table-lspace: 0pt;mso-table-rspace: 0pt;word-break: break-word;-webkit-hyphens: none;-moz-hyphens: none;hyphens: none;font-family: 'Open Sans', sans-serif, Arial;border-collapse: collapse;line-height:26px;font-size:26px;" height="26px" class="spacerMobile8"> </td>
</tr>
<tr align="left">
<td align="right" width="43" class="sectionCount" style="width: 43px; display: inline-block; font-size: 24px; font-family:'Open Sans', sans-serif, Arial; color: #5d636a; text-align: right; font-weight: 600"> 2.</td>
<td align="left" width="20" style="width: 20px;font-size: 14px;;background:red"> </td>
<td style=" color: #5d636a;font-size: 18px;font-family:'Open Sans', sans-serif, Arial;font-weight: 600;"> Test case 2 tools</td>
</tr>
<tr align="left">
<td colspan="3" style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;mso-table-lspace: 0pt;mso-table-rspace: 0pt;word-break: break-word;-webkit-hyphens: none;-moz-hyphens: none;hyphens: none;font-family: 'Open Sans', sans-serif, Arial;border-collapse: collapse;line-height:26px;font-size:26px;" height="26px"> </td>
</tr>
<tr align="left">
<td align="right" width="43" class="sectionCount" style="width: 43px; display: inline-block; font-size: 24px;color: #5d636a; text-align: right;font-family:'Open Sans', sans-serif, Arial;font-weight: 600;"> 3.</td>
<td align="left" width="20" style="width: 20px;font-size: 14px;;background:red"> </td>
<td style="font-size: 18px;font-weight: 600; font-family:'Open Sans', sans-serif, Arial;color: #5d636a;"> Test case 3 </td>
</tr>
</tbody>
</table>
1。与红色背景td(列)之间不应有空格
答案 0 :(得分:1)
已删除的显示:行内块;在第一个
<table style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;mso-table-lspace: 0pt;mso-table-rspace: 0pt;border-spacing: 0;border-collapse: collapse;width:100%;text-align: left;border: 0px;border-collapse:collapse;border-spacing:0px;" width="100%" align="left" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr align="left">
<td align="right" width="43" class="sectionCount" style="width: 43px; font-size: 24px;color: #177fff; text-align: right; font-weight: 600; font-family:'Open Sans', sans-serif, Arial;"> 1.</td>
<td align="left" width="20" style="width: 20px;font-size: 14px;background:red"> </td>
<td align="left"> <a href="http://mylink" target="_blank" style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;display: inline-block;font-size: 18px;font-weight: 600; font-family:'Open Sans', sans-serif, Arial;color: #177fff;text-decoration: none"> TEST CASE 1 </a> </td>
</tr>
<tr align="left">
<td colspan="3" style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;mso-table-lspace: 0pt;mso-table-rspace: 0pt;word-break: break-word;-webkit-hyphens: none;-moz-hyphens: none;hyphens: none;font-family: 'Open Sans', sans-serif, Arial;border-collapse: collapse;line-height:26px;font-size:26px;" height="26px" class="spacerMobile8"> </td>
</tr>
<tr align="left">
<td align="right" width="43" class="sectionCount" style="width: 43px; font-size: 24px; font-family:'Open Sans', sans-serif, Arial; color: #5d636a; text-align: right; font-weight: 600"> 2.</td>
<td align="left" width="20" style="width: 20px;font-size: 14px;;background:red"> </td>
<td style=" color: #5d636a;font-size: 18px;font-family:'Open Sans', sans-serif, Arial;font-weight: 600;"> Test case 2 tools</td>
</tr>
<tr align="left">
<td colspan="3" style="-webkit-text-size-adjust: 100%;-ms-text-size-adjust: 100%;mso-table-lspace: 0pt;mso-table-rspace: 0pt;word-break: break-word;-webkit-hyphens: none;-moz-hyphens: none;hyphens: none;font-family: 'Open Sans', sans-serif, Arial;border-collapse: collapse;line-height:26px;font-size:26px;" height="26px"> </td>
</tr>
<tr align="left">
<td align="right" width="43" class="sectionCount" style="width: 43px; font-size: 24px;color: #5d636a; text-align: right;font-family:'Open Sans', sans-serif, Arial;font-weight: 600;"> 3.</td>
<td align="left" width="20" style="width: 20px;font-size: 14px;;background:red"> </td>
<td style="font-size: 18px;font-weight: 600; font-family:'Open Sans', sans-serif, Arial;color: #5d636a;"> Test case 3 </td>
</tr>
</tbody>
</table>