gpt4 book ai didi

html - Outlook 2010 中行之间的额外间距

转载 作者:行者123 更新时间:2023-11-28 03:09:13 25 4
gpt4 key购买 nike

我正在使用表格在我的 HTML 电子邮件中伪造元素符号列表。它在除 Outlook 2010 之外的每个客户端中看起来都很棒,它在每行之间添加了额外的空白:

correct vs outlook

表格 cellpaddingcellspacing 设置为 0,我尝试在每个表格行中显式设置 line-height

代码:

<table width="100%" style="table-layout: fixed; margin-bottom: 21px; border: none;" cellpadding="0" cellspacing="0">
<tr>
<td width="15" valign="top" style="border-collapse: collapse;">&bull;</td>
<td width="485" valign="top" style="border-collapse: collapse;">Satisfy the PSD2 requirement for Strong Customer Authentication (SCA)</td>
</tr>
<tr>
<td width="15" valign="top" style="border-collapse: collapse;">&bull;</td>
<td width="485" valign="top" style="border-collapse: collapse;">Help you comply with GDPR and minimize the risk of potential penalties</td>
</tr>
<tr>
<td width="15" valign="top" style="border-collapse: collapse;">&bull;</td>
<td width="485" valign="top" style="border-collapse: collapse;">Reduce friction to improve your user experience</td>
</tr>
</table>

最佳答案

问题是应用于父 tablemargin-bottom 样式。 Outlook 将该样式应用于子元素,因此每个 td 的底部边距为 21px。移除下边距并使用空白表格行来伪造下边距:

<table width="100%" class="list-table" style="table-layout: fixed; border: none;" cellpadding="0" cellspacing="0">
<tr>
<td width="15" valign="top" style="border-collapse: collapse;">&bull;</td>
<td width="485" valign="top" style="border-collapse: collapse;">Satisfy the PSD2 requirement for Strong Customer Authentication (SCA)</td>
</tr>
<tr>
<td width="15" valign="top" style="border-collapse: collapse;">&bull;</td>
<td width="485" valign="top" style="border-collapse: collapse;">Help you comply with GDPR and minimize the risk of potential penalties</td>
</tr>
<tr>
<td width="15" valign="top" style="border-collapse: collapse;">&bull;</td>
<td width="485" valign="top" style="border-collapse: collapse;">Reduce friction to improve your user experience</td>
</tr>
<tr>
<td width="100%" height="21" colspan="2" style="border-collapse: collapse;">&nbsp;</td>
</tr>
</table>

关于html - Outlook 2010 中行之间的额外间距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45803472/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com