Css背景-图像和图像未显示在Outlook中 [英] CSS background-image "image" not showing up in Outlook

查看:19
本文介绍了Css背景-图像和图像未显示在Outlook中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一封基于HTML的电子邮件,其中一个元素定义了"Backback-Image"属性。在Outlook中发送和接收电子邮件时,不会显示背景图像。当它在Gmail中被接收时,它就会显示出来。我认为这可能与Outlook特定的限制有关?以下是HTML代码:

<div style="text-align: center; background-image:url('http://image.info.geha.com/lib/fe44157075640479741475/m/1/34273cbe-2375-4a73-aec2-5151bf51cf91.jpg'); border-color:#e3e4e5">
 <p style=" align: center; bottom: 50px; left: 100
px;">
  <br>
  <span style="color:#500778;"><span style="font-size:20px;">GEHA EXCLUSIVES</span><br>
  <span style="font-size:18px;">______</span></span><br>
  <br>
  <br>
  <span style="color:#ee7623;"><u><span style="font-size:18px;"><a href="#">Link to website content goes here</a></span></u></span><br>
  <br>
  <span style="color:#ee7623;"><u><span style="font-size: 18px; text-align: center;"><a href="#">Link to website content goes here</a></span></u></span><br>
  <br>
  <span style="display: none;">&nbsp;</span><span style="color:#ee7623;"><u><span style="font-size: 18px; text-align: center;"><a href="#">Link to website content goes here</a></span></u></span><br>
  <br>
  <br>
  <br>
  <span style="display: none;">&nbsp;</span></p></div>

以下是Outlook的呈现:

这里是Gmail的渲染:

知道为什么会这样吗?

推荐答案

Outlook2000-03支持背景图像,因为它们使用Internet Explorer作为呈现引擎。然而,在Outlook 2007-16中,他们转而使用Microsoft Word,这让他们非常头疼。

除非您使用VML,否则Outlook 07-16将不支持背景图像。Campaign Monitor有一个很好的工具来构建代码:https://backgrounds.cm/

另一种选择是在div上使用bgcolor属性。Outlook 07-16是唯一仍支持该功能的电子邮件浏览器。所有其他浏览器都将使用您的背景图像。你不会有圆角,但你的灰色背景会在那里。

有关哪些浏览器支持什么的任何其他问题,请使用以下列表:https://www.campaignmonitor.com/css/color-background/background-image/

这篇关于Css背景-图像和图像未显示在Outlook中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆