outlook - Outlook w10 应用程序中未显示时事通讯背景图像

标签 outlook html-email newsletter

在询问之前,我已经尝试了此处发布的所有可能的解决方案,但我无法完成这项工作。另外,我不确定它是否正常工作,或者我只是在 w10 邮件应用程序上遇到问题。

这是我正在使用的代码。

<td background="image.jpg" bgcolor="#e7e7e9" width="299" height="274" valign="top">
  <!--[if gte mso 9]>
  <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:299px;height:274px;">
    <v:fill type="tile" src="image" color="#e7e7e9" />
    <v:textbox inset="0,0,0,0">
  <![endif]-->
  <div>
  </div>
  <!--[if gte mso 9]>
    </v:textbox>
  </v:rect>
  <![endif]-->
</td>

任何指导方针将不胜感激

谢谢

最佳答案

通过搜索网络,我找到并改编了一个基于 VML 的解决方案,该解决方案也向后兼容 Outlook。

注意:这仅适用于嵌入表格单元格中的背景图像。我还没有尝试过这样做来制作全身电子邮件背景图像。一旦完成,我将更新这篇文章。

背景信息(无双关语)

之前用于在 Outlook 电子邮件中嵌入背景图像的基于 VML 的黑客攻击(版本 2007、2010、2013、2016)不适用于 Windows 10 电子邮件应用程序(Win10 应用程序)。作为引用,您可以在backgrounds.cm查看该解决方案。 .

微软继续使用 Microsoft Word 作为其 HTML 渲染引擎,但我猜测他们对 Win10 应用程序的渲染引擎进行了更改,从而影响了其 VML 支持。

注意:我的示例使用尺寸为 640x254 的图像。注意:我感觉 XML 命名空间是重复的,但由于它有效,我不想弄乱它。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>Your Title</title>
</head>
<body>
    <table width="640" align="center" cellpadding="0" cellspacing="0" style="margin:0 auto;">
    <tr><td height="254" background="http://yourimagepath.jpg" style="background:url(http://yourimagepath.jpg) no-repeat 0 0;">
    <!--[if gte mso 9]>
        <v:image xmlns:v="urn:schemas-microsoft-com:vml" id="theImage" style="behavior:url(#default#VML);position:absolute;width:640px;height:254px;top:0;left:0;z-index:-1" src="http://yourimagepath.jpg"/>
    <![endif]-->
    </td></tr>
    </table>
</body>
</html>

我强调了我添加的具体内容或确保其正常工作所需的具体内容。

enter image description here

改编自:

关于outlook - Outlook w10 应用程序中未显示时事通讯背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33670046/

相关文章:

html - 链接到部分不适用于富含 HTML 的 Outlook 电子邮件

Outlook PC 中的 HTML 电子邮件图像/产品名称问题

php - CakePHP 3.0 在模板中回显 css 文件的内容

html - 导出的 MailChimp HTML 模板看起来不一样

css - 如何写一个:visited in inline CSS?

html - 如何防止 outlook 破坏 div 大小? (通讯)

outlook - 无法在 Outlook 插件中设置测试许可证 token

HTML 邮件 - Outlook - 加载图像后 - 布局损坏

django 静态文件不提供给 HTML-EMail 模板

html - Outlook 2010 时事通讯中的不良图像