【发布时间】:2019-08-23 21:46:42
【问题描述】:
我正在编写 HTML 电子邮件。我有一个包含背景图像的 td。它在 Windows 上的所有主要电子邮件客户端栏 Outlook 中呈现。我选择使用http://backgrounds.cm/ 作为解决方法。我的问题是图像的高度和宽度与输入的值不对应。图像看起来被压扁了。我将它用作嵌套表的一部分。
<td class="full" width="300px" style="width: 300px;">
<table>
<tr>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td background="http://www.gstatic.com/tv/thumb/persons/8327/8327_v9_bb.jpg" bgcolor="#7bceeb" valign="top">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000; width: 200px; height: 200px;">
<v:fill type="tile" src="http://www.gstatic.com/tv/thumb/persons/8327/8327_v9_bb.jpg" color="#7bceeb" />
<v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0">
<![endif]-->
<div style="width: 200px; height: 200px;">
</div>
<!--[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]-->
</td>
</tr>
</table>
</tr>
<table>
</td>
【问题讨论】:
-
根据您的代码,图像应该以 200 x 200 像素显示。有屏幕截图来显示它的外观和预期外观吗?
标签: html background-image html-email