繁体   English   中英

Gmail 中不显示背景图片

[英]Background image doesn't show up in 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 中显示背景图片的正确方法。 那为什么不显示呢?

谢谢!!

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

不要使用背景图片。 Gmail 等将忽略内联样式中的任何 url() 属性,以及简单的 background= 标签属性。 如果您愿意,您可以使用背景颜色(bgcolor 标记属性或 background-color: css 语句)。

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

问候

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

但是为了显示它,您的代码必须至少包含一个 < img > 标签。 您可以使用 interval.gif 来欺骗它(或任何与此相关的透明图像)。

在我的例子中,我在一个样式标签中为 background-repeat 和 background-size 定义了 CSS 样式,该样式标签被转换为单个内联背景: no-repeat/cover 覆盖了我的表格的背景属性。 使用对我有用

暂无
暂无

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

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