我创建了一封 HTML 电子邮件,在 Outlook 2007 中查看时,我看不到某些图像,因为它们是背景。我已经使用 VML 做了一些修改,但是它不允许我将高度值留空,因为它默认为 100px,或者我无法输入自动或百分比。背景图像需要能够根据文本大小调整大小,以便显示所有文本。
这是我正在使用的代码,除了高度值之外。
<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>
任何帮助,将不胜感激。
Use:
<v:image xmlns:v="urn:schemas-microsoft-com:vml" id="theImage" style='behavior: url(#default#VML); display:inline-block; position:absolute; height:200px; width:620px; top:0; left:0; border:0; z-index:1;' src="http://example.com/content_centre.png"/>
而不是:
<v:rect
然后在你的“v:shape”中将高度更改为“auto”,这在 OL2007 中对我有用。
请记住,我的示例基于内容超过 100 像素的区域,因此我不确定它是否仍默认为 100 像素作为最小值,如果您需要它更小,则在“v:”中设置最大高度shape”低于 100px(但显然这会阻止缩放到内容)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)