HTML 电子邮件,特定于 Outlook 2007 - 如何修复 'Spacing between text in same <strong> tag'

标签 html css email outlook html-email

在 litmus 中测试电子邮件模板,无法弄清楚为什么 Outlook 2007 为嵌套在 <strong> 中的文本添加了很大的空间。 , <a> , <td> , <tr>标签。请注意,该按钮适用于所有其他客户端。

尝试添加各种内联 CSS,如 line-height、mso-line-height: exactly;

<!--CTA-->
    <tr>
        <td align="center">
            <table border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td align="center" bgcolor="#009cb3" width="200" height="60" style="-webkit-border-radius: 100px; -moz-border-radius: 100px; border-radius: 100px;">
                        <a class="bg-rollover" href="" target="_blank" style="font-size:14px;font-family:Helvetica, Arial, sans-serif;color:#ffffff;text-decoration:none;padding:28px 12px;display:inline-block;width:200px;border:1px solid #009cb3;-webkit-border-radius: 100px; -moz-border-radius: 100px; border-radius: 100px;">
                        <strong style="text-transform:uppercase;">button text</strong>
                        </a>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
<!--End of CTA-->

我希望输出的两行文本之间有一个小间隙。

最佳答案

决定使用 VML 使按钮在 Outlook 中工作。对于那些感兴趣的人,代码在下面,但请注意,您必须更改 VML 和 HTML 中的 href 和按钮文本。

<!--CTA-->
   <tr>
      <td align="center">
         <div>
         <!--[if mso]>
            <v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="#" style="height:60px;v-text-anchor:middle;width:200px;" arcsize="5%" strokecolor="#ffbb00" fillcolor="#ffbb00">
               <w:anchorlock/>
               <center style="color:#041857;font-family:Helvetica, Arial, sans-serif;font-size:20px;font-weight:bold;">CTA text</center>
            </v:roundrect>
         <![endif]-->
            <a href="#" style="background-color:#ffbb00;border:1px solid #ffbb00;-webkit-border-radius: 3px; -moz-border-radius: 3px; border-radius: 3px;color:#041857;display:inline-block;font-family:Helvetica, Arial, sans-serif;font-size:20px;line-height:24px;text-align:center;text-decoration:none;width:200px;-webkit-text-size-adjust:none;mso-hide:all;font-weight:bold; padding: 12px 18px;">CTA text</a>
         </div>
      </td>
   </tr>
<!--End of CTA-->

尽管 VML 已被 SVG 取代,但旧版本的 Outlook 使用 Microsoft Word 来呈现电子邮件。 Word 可识别 VML,因此如果内容未按预期在 Outlook 中呈现,则使用它很有用。

关于HTML 电子邮件,特定于 Outlook 2007 - 如何修复 'Spacing between text in same <strong> tag',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57114488/

相关文章:

javascript - xhr加载后如何使用点击事件而不查询

iOS Safari 因提交大型帖子数据表单而崩溃

jQuery .replace() 一个值(单词)

html - 如何在标签后放置 ul 列表?

email - CSS 到 HTML 电子邮件转换器

email - 在 Emacs VM 中设置 Gmail

javascript - 此html代码是否可以自动提交(如果提交后需要出现单独的页面)

html - 可以用 CSS 实现吗?

javascript - 在 Chrome 中单击并拖动光标

google-app-engine - Google App Engine - 接收邮件(带附件)是否会收取传入带宽费用?