我已经尝试解决这个问题几个小时了,但我似乎无法找到问题所在。
我有这个必须在低分辨率设备上正确包装的 HTML 电子邮件签名。
这是一个样机,它在大屏幕设备上的外观:
这是一个在小屏幕设备上应该如何显示的模型:
这是标记:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<table width="100%">
<tr>
<td>
<!-- TEXT CELL -->
<table align=left width=160>
<tr>
<td>
<p>
<span style='font-size:12.0pt;font-family:"Times New Roman","serif"; mso-fareast-font-family:"Times New Roman"'>sep</span>
</p>
</td>
</tr>
</table>
<!-- TEXT CELL -->
<table align=left width=160>
<tr>
<td>
<p>
<span style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>ult</span>
</p>
</td>
</tr>
</table>
<!-- TEXT CELL -->
<table align=left width=160>
<tr>
<td>
<p>
<span style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>tur</span>
</p>
</td>
</tr>
</table>
<!-- TEXT CELL -->
<table align=left width=160>
<tr>
<td>
<p>
<span style='font-size:12.0pt;font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'>ura</span>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
问题出在网络客户端上。出于某种原因,这 4 个表格中的每一个表格旁边总是附加了一个额外的 HTML 元素:
这些是结果:
MS Outlook 2007(正确显示):
Apple GMail 客户端(正确显示和包装,因为它是小分辨率屏幕):
Outlook web(有一个额外的 HTML 元素破坏了布局,图片中的详细信息):
GMail 网络(有点类似于 Outlook 网络):
我还想提一下,我用 Litmus 测试了这些,一切看起来都不错。我不确定为什么在这些“现实世界”的情况下情况会有所不同。
可能与我放置 HTML 签名的过程有关:
- 打开包含签名的 HTML 页面
- 选择该页面中的所有内容(ctrl+A)
- 复制所有内容(ctrl+C)
- 打开 MS Outlook 2007
- 转到工具 -> 选项 -> 邮件格式 -> 签名
- 新签名 -> 将内容粘贴到文本区域 -> 保存新创建的签名。