如何在 Outlook 2010 html 电子邮件中显示背景颜色?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13410874/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to display background color in outlook 2010 html email?
提问by NehaKharkwal
My problem is related to Microsoft Outlook 2010. Actually I want to publish my HTML newsletter in Outlook 2010, but the main problem which I am facing is styling problem it's not showing color and all when the newsletter is published in Outlook 2010. please help me out if you know how to set color and css style in Outlook.
我的问题与 Microsoft Outlook 2010 相关。实际上我想在 Outlook 2010 中发布我的 HTML 简报,但我面临的主要问题是样式问题,它不显示颜色,并且在 Outlook 2010 中发布简报时,请帮助我如果您知道如何在 Outlook 中设置颜色和 css 样式,请退出。
回答by marissajmc
This method works across email clients:
此方法适用于电子邮件客户端:
<table bgcolor="#3399ff" style="background:#3399ff;"><tr><td>test</td></tr></table>
回答by Pietro Ferrero
the background-color property works in Outlook 2010.
background-color 属性在 Outlook 2010 中有效。
reference: http://www.campaignmonitor.com/css/
回答by ajcoder
You can also do it this way - styling in the td cell.
您也可以这样做 - 在 td 单元格中设置样式。
<table><tr><td bgcolor="#3399ff">test</td></tr></table>
回答by tucq88
<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. Check out this link : https://litmus.com/community/learning/25-understanding-background-images-in-emailhttp://backgrounds.cm/
另外:如果您想设置背景图像(不是颜色)的样式,默认的 Outlook 2007+ 将不支持它,但是您可以做一些技巧来实现这一点。查看此链接:https: //litmus.com/community/learning/25-understanding-background-images-in-email http://backgrounds.cm/