首页 > 解决方案 > 条件注释似乎在 Outlook 2016 中不起作用

问题描述

我们在爆破电子邮件中使用条件评论来隐藏与 Outlook 不兼容的视觉元素,同时显示兼容的元素。

最近,在 Outlook 2016 中,此功能似乎不再起作用。

我附上了示例代码的图像,以及它在 Outlook 2016 中的呈现方式。您会注意到应该出现在 Outlook 中的文本不是。

是否已从 Outlook 中删除了条件评论支持?

查看源代码时条件注释的屏幕截图,以及它如何未在 Outlook 中显示。

在此处输入图像描述

标签: outlook

解决方案


尝试一下,不要在代码中留下空白:

目标展望

<!--[if gte mso 9]>
    <img src="http://via.placeholder.com/300x300/ff0000?text=Outlook" alt="" width="100%" style="display:inline-block;border:none;outline:none;padding:0;margin:0;width:100%;height:auto;" border="0" hspace="0" vspace="0">
<![endif]-->

从 Outlook 中隐藏

<!--[if !mso]><!-- -->
    <img src="http://via.placeholder.com/300x300/0000ff/?text=Modern+Email" alt="Modern+Email" width="100%" style="display:inline-block;border:none;outline:none;padding:0;margin:0;width:100%;height:auto;" border="0" hspace="0" vspace="0">
<!--<![endif]-->

祝你好运。


推荐阅读