gpt4 book ai didi

html - 在 HTML 电子邮件上设置 css 属性

转载 作者:太空宇宙 更新时间:2023-11-03 21:00:27 24 4
gpt4 key购买 nike

我正在从我的网站发送一封自动 html 电子邮件。在我的电子邮件中,我将一些文本设置为红色,并将字体设置为某种字体类型。当我查看来自雅虎邮件的 html 电子邮件时,应用了红色,但未应用字体。这是为什么?

另外,当我尝试查看yahoo mail 网页的html 源代码时,我无法在此html 源代码上找到我的html 电子邮件内容。这是为什么?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<h2 style="color: #CC0000; text-align: center;">
Welcome to the Dave&#39;s Photo Album</h2>
<p>
Hi <%UserName%>,</p>
<p>
Thanks for registering. Here is your new user name and password:</p>
<p>
User Name: <%UserName%>
</p>
<p>
Password: <%Password%>
</p>
<p>
Enjoy!
</p>

最佳答案

您只能使用内联 css,根据我的经验,您需要使用表格,因为并非所有电子邮件服务(可能没有)都能很好地理解 div,我还建议模板宽度保持在 600 像素以内,因为它通常显示在“ Pane ”中,例如 yahoo mail、gmail、outlook 等。您可以在此页面查看大量资料:

http://www.campaignmonitor.com/css/

没有 html、正文或标题声明,仅以 <table></table> 开头就像你的 body 一样。

outlook 2007 可能是限制最多的版本。

祝你好运

关于html - 在 HTML 电子邮件上设置 css 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4083354/

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