【发布时间】:2019-10-21 05:45:46
【问题描述】:
我知道 Outlook 并没有真正为背景渲染图像,但使用我找到的防弹背景,我设法添加了背景。但是,我希望背景只能在表格内(即 600 像素)。它适用于除 Outlook 之外的所有其他电子邮件(我使用 Outlook 2010,因此它可能也不适用于 Outlook 2007-2016)。在 Outlook 中,背景跨越整个正文,而不仅仅是表格。
我尝试在 td 中添加背景图像,但图像仍然超出表格。
<table>
<tr>
<td style="background-image:url('image-here');background-repeat:no-repeat;background-position:top;" border="0" cellspacing="0" cellpadding="0" background="image-here">
<!--[if gte mso 9]>
<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
<v:fill type="tile" src="image-here" color="#ffffff" />
</v:background>
<![endif]-->
<table>
content here
</table>
</td>
</tr>
</table>
【问题讨论】:
-
嗯...有点不清楚您在说什么。您是说 Outlook 不会使用 css 样式声明呈现,但使用供应商标签和矢量标记您可以渲染图像,但仍不遵守样式声明。所以..你的问题是什么?在这种情况下,如何将 css 样式声明应用于 vml? ...另外,这是一个分级图像还是矢量图像?
-
您需要在背景图片上设置宽度和高度。我想如果你看到你的背景图像工作,你已经设置了这些?如果是这种情况,您能否发布您的实际代码。将帮助我们正确调试。
标签: html email outlook html-email vml