3
我创建了一个HTML电子邮件,并且在Outlook 2007中查看时,我无法看到一些图像,因为它们是背景。我使用VML做了一些破解,但它不会让我将高度值留空,因为它默认为100px,或者我不能放置自动或百分比。背景图片需要能够根据文字大小调整大小,以显示所有文字。HTML电子邮件呈现在Outlook中 - VML
这是我除了高度值以外的代码。
<td colspan="6" align="center" valign="top" style="background-image: url('http://example.com/content_centre.png');" background="http://example.com/content_centre.png">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" style="width:620px;height:200px;" strokecolor="none">
<v:fill xmlns:v="urn:schemas-microsoft-com:vml" type="tile" color="#DDDDDD" src="http://example.com/content_centre.png" /></v:fill>
</v:rect>
<v:shape xmlns:v="urn:schemas-microsoft-com:vml" id="theText" style="position:absolute;width:620px;height:200px;">
<![endif]-->
<table cellspacing="0" cellpadding="0" border="0" style="width:100%;"><tr>
<td width="30"></td>
<td align="left" style="font-family:Arial, Helvetica, sans-serif; background:#ffffff; ">
<p>This is where the text will appear. Doesn’t matter how much text it just stops displaying it.</p></td>
<td width="30"></td>
</tr>
</table>
<!--[if gte mso 9]>
</v:shape>
<![endif]-->
</td>
任何帮助,将不胜感激。
我已经在这里提供了对这个问题的答案,希望它可以帮助你:http://stackoverflow.com/questions/23280715/full-width -backgrounds-上的前景,13年7月10日 – davidcondrey 2014-05-07 07:32:39