简体   繁体   English

如何在 Outlook 2010 html 电子邮件中显示背景颜色?

[英]how to display background color in outlook 2010 html email?

我的问题与 Microsoft Outlook 2010 相关。实际上我想在 Outlook 2010 中发布我的 HTML 简报,但我面临的主要问题是样式问题,它不显示颜色,并且在 Outlook 2010 中发布简报时,请帮助我如果你知道如何在 Outlook 中设置颜色和 css 样式。

此方法适用于电子邮件客户端:

<table bgcolor="#3399ff" style="background:#3399ff;"><tr><td>test</td></tr></table>

您也可以这样做 - 在 td 单元格中设置样式。

<table><tr><td bgcolor="#3399ff">test</td></tr></table>
<table><tr><td bgcolor="#3399ff">test</td></tr></table>

This will NOT work on Outlook 2010. If you want to style background-color in Outlook, you'll have to put your background style in style attribute, like this这不适用于 Outlook 2010。如果您想在 Outlook 中设置背景颜色的样式,则必须将背景样式放在样式属性中,如下所示

<table><tr><td bgcolor="#3399ff" style="background-color:#3399ff">test</td></tr></table>

Plus: If you want to style background IMAGE (not color), default Outlook 2007+ will not support it, but you can do some tricks to make that happen.另外:如果您想设置背景图像(不是颜色)的样式,默认的 Outlook 2007+ 将不支持它,但是您可以做一些技巧来实现这一点。 Check out this link : https://litmus.com/community/learning/25-understanding-background-images-in-email http://backgrounds.cm/查看此链接: https : //litmus.com/community/learning/25-understanding-background-images-in-email http://backgrounds.cm/

the background-color property works in Outlook 2010. background-color 属性在 Outlook 2010 中有效。

reference: http://www.campaignmonitor.com/css/参考: http : //www.campaignmonitor.com/css/

I was struggling with the same issue and found out that Outlook doesn't support the name of the color like modern browsers.我正在为同样的问题苦苦挣扎,发现 Outlook 不支持像现代浏览器那样的颜色名称。 I changed:我变了:

<tr style="background-color: lightgray">

to

<tr style="background-color: #d3d3d3">

and Outlook loved it. Outlook 喜欢它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM