在询问之前,我已经尝试了此处发布的所有可能的解决方案,但我无法完成这项工作。另外,我不确定它是否正常工作,或者我只是在 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>
我强调了我添加的具体内容或确保其正常工作所需的具体内容。
改编自:
- Alex Robinson 来自 Windows 10 Mail Email Rendering Support + Quirks 的评论.
- Ruth Boon 的评论来自 Windows 10 Mail: Bulletproof Background/Buttons Broken .
关于outlook - Outlook w10 应用程序中未显示时事通讯背景图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33670046/