背景图片未显示在Gmail中

时间:2012-01-22 22:36:42

标签: html email gmail

我编写了一封html电子邮件,并在Gmail中进行了测试。除了背景图像之外,一切都很好。我把背景图片放在我的包装表上,如下所示:

<table cellpadding="0" cellspacing="0" border="4px solid grey" align="left"  background="http://www.totalrecallsolutions.com/corporate/email templates/images/appt_reminder_one_bg.jpg">

然而,Gmail中没有图片显示。我从谷歌搜索中了解到,这是在Gmail中显示背景图片的正确方法。那为什么不出现呢?

谢谢!

2 个答案:

答案 0 :(得分:2)

除了带空格的网址,还有另一件事,Gmail不允许内联css中的url()属性

  

请勿使用背景图片。除其他外,Gmail会忽略任何内容   内联样式中的url()属性和简单的background =标记   属性。如果您愿意,可以使用背景颜色(bgcolor标签   attribute或background-color:css statement)。

以下是我阅读的链接:http://groundwire.org/support/articles/css-and-email-newsletters

此致

答案 1 :(得分:0)

Gmail已于去年2月添加了对背景和背景图片属性的支持(根据Campaign Monitor)。

但为了显示它,你的代码必须包含至少一个&lt; img&gt;标签。您可以使用spacer.gif来欺骗它(或任何透明图像)。

相关问题