gpt4 book ai didi

格式化为在 Outlook 中显示的 HTML 电子邮件 - 字间距问题

转载 作者:太空宇宙 更新时间:2023-11-03 23:40:34 26 4
gpt4 key购买 nike

我一直在尝试格式化电子邮件模板以跨客户端工作。我尝试了不同的框架,并且阅读了有关兼容性问题的信息,尤其是与 Outlook 的兼容性问题。虽然我已经能够格式化模板以在 Outlook 中很好地显示,但我仍然遇到单词之间有很大空格的问题。它不会发生在每个段落中,而且似乎一次只会发生一两个词。我把这个 screenshot以供引用。 请注意“巧克力世界”部分下的免责声明文本。

这是该部分的代码,所有样式都是内联的。是否存在可能导致此问题的任何内联样式的兼容性问题?

<table align="left" cellpadding="0" cellspacing="0" class="deviceWidth" style="width: 33%;">
<tbody>
<tr>
<td style="padding: 0 10px 20px 10px;" align="center" valign="top">
<p style="mso-table-lspace: 0; mso-table-rspace: 0; margin: 0;"><a href="#"><img align="left" alt="" border="0" class="deviceWidth" src="http://www.ctsciencecenter.org/cm_mailer/impact/chocolate-world-expo_impaCT.jpg" style=" width: 128px;padding:0px 0px 0px 10px;" width="128" /></a></p>
</td>
</tr>
<tr>
<td style="padding: 0 10px 20px 10px;"><a style="text-decoration: none; font-size: 16px; color: #333; font-weight: bold; font-family: Arial, sans-serif;" href="#">Chocolate World Expo</a>
<p style="color: #333; text-align: left; font-size: 12px; line-height: 24px;"><strong>April 27, 10AM&ndash;7PM<br />
Special Member Pricing:<br />
$15 Adults, $10 Youth<br />
Coupon Code: Bonbon</strong></p>
<p style="color: #333; text-align: left; font-size: 12px; line-height: 24px;">Sample chocolate offerings, baked goods, cheeses and gelato that will perk up your taste buds. Enjoy a different treat with every step. All of these delicious items will be available for purchase! Visit <a href="http://thechocolateexpo.com/">Chocolate World Expo on the web</a> to find what you fancy.<br /><br /><strong style="font-size:11px;">Please note that we will be CLOSED to the public on April 27. Purchasing tickets in advance is highly recommended.</strong></p>
<table align="left" style="width: 90px;">
<tbody>
<tr>
<td style="padding: 10px 16px; background-color: #666; border-top: 1px solid #eee; background-repeat: repeat-x;" align="center" bgcolor="#666"><a style="color: #FFF; font-size: 12px; font-weight: bold; text-align: center; text-decoration: none; font-family: Arial, sans-serif; -webkit-text-size-adjust: none;">Tickets &raquo; </a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

感谢您的帮助!

最佳答案

我不确定您的 CSS 在哪里导致文本对齐(您脑子里有没有 <style> ?),但看起来您正在尝试防止它在您使用时在本地发生text-align:left; .

text-align并不总是有效 - 在 html 电子邮件中,您应该改为使用 align="left"在你的<td>元素。这将影响其中的所有内容。

例子:

<table width="600" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left">
This text will align left
</td>
</tr>
</table>

关于格式化为在 Outlook 中显示的 HTML 电子邮件 - 字间距问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22997418/

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