在Outlook 2013的试用版中,HTML电子邮件中的图像显示非常奇怪。据我所能通过测试,它看起来像小于20像素高的图像有填充,使他们20个像素高。有什么我能改变的吗?这些电子邮件在Outlook 2010中看起来很好,而且我一直在测试它们。
我尝试过更改它们所在的表单元格的高度(通过height="13"以及内联css)以及它们所在的表和表行的高度,但都没有效果。下面的代码是触发此问题的简单示例,因为您将能够看到图像上方单元格的红色背景:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="195" style="background-color:#ff0000;"><img src="image url here" alt="" width="195" height="13" style="display: block" /></td>
  </tr>
</table>
</body>
</html>有人能帮忙吗?
发布于 2012-08-18 15:54:46
将line-height样式添加到td标记中(为了更好地衡量,还向td标记添加height属性)。
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="195" height="13" style="background-color:#ff0000; line-height:13px;">
      <img src="..." alt="" width="195" height="13" style="display:block;" />
    </td>
  </tr>
</table>修改后的代码对Outlook的所有版本都进行了测试。
发布于 2012-08-10 12:01:13
删除细胞填充这你不会看到红色bg。
发布于 2014-03-11 18:13:28
我发现添加<font size="1"><img /></font>也可以解决这个问题。
https://stackoverflow.com/questions/11888571
复制相似问题