【发布时间】:2021-01-22 02:25:39
【问题描述】:
<html xmlns:v="urn:schemas-microsoft-com:vml">
<body>
<table width="600" border="1" cellpadding="5">
<tbody>
<tr>
<td colspan="1">qnty</td>
<td colspan="2">price</td>
</tr>
<tr>
<td colspan="1">100</td>
<td colspan="1">
<!--[if mso]>
<span style="position: relative;color: black;">
$7.75
<v:rect stroke="f" fill="t" fillcolor="red" style="width: 40px; height: 1px; position: absolute; left: 0px;top: 8px"></v:rect>
</span>
<![endif]-->
<!--[if !mso]>
<span style="position: relative;color: black;">
$1232
<v:rect stroke="f" fill="t" fillcolor="red" style="width: 40px; height: 1px; position: absolute; left: 0px;top: 8px"></v:rect>
</span>
<![endif]-->
</td>
<td colspan="1">0.25</td>
</tr>
</tbody>
</table>
</body>
</html>
我正在使用上面的 HTML 在 Outlook 中显示价格 7.75,在 GMAL 等其他电子邮件中显示 1232。该代码在 Outlook 上运行良好,但在 Gmail 上显示相同的结果。
Gmail
展望
【问题讨论】:
-
这能回答你的问题吗? HTML Emails: fallback for mso conditional?
-
从您的屏幕截图看来您正在查看 Outlook 中的两封电子邮件?要使代码生效,您需要在 Outlook(桌面)和 Gmail(网络浏览器)中签入。
-
@Syfer 我已经更新了图片。是我上传错了。
-
@KenY-N 与 gmail 显示的价格不完全一样,outlook 可以检查更新的图像
标签: html email html-email