-->

HTML电子邮件渲染展望 - VML(HTML Email Render in Outlook -

2019-09-20 16:19发布

我创建了一个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>

任何帮助,将不胜感激。

Answer 1:

采用:

<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:形”变化的高度为“自动”,这为我工作在OL2007。 铭记我的例子是基于有超过100像素,所以我不知道,如果它仍然默认为100像素为最低,如果你需要它是小于设置的“V一个最大高度内容的区域:塑造”下方100像素(但显然这会妨碍扩展到内容)



文章来源: HTML Email Render in Outlook - VML