outlook - 条件注释似乎在 Outlook 2016 中不起作用
问题描述
我们在爆破电子邮件中使用条件评论来隐藏与 Outlook 不兼容的视觉元素,同时显示兼容的元素。
最近,在 Outlook 2016 中,此功能似乎不再起作用。
我附上了示例代码的图像,以及它在 Outlook 2016 中的呈现方式。您会注意到应该出现在 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]-->
祝你好运。
推荐阅读
- java - Apk 未正确构建
- deployment - DigitalOcean - 在预编译资产上限制登台部署错误
- java - 在 SpringSecurity 中未调用自定义 UserDetailsService Impl
- sql - sqlopenresult' status='-239' / cognos 报错
- python - GloVe 文本摘要返回停用词乱码
- c# - 从 Child UserControl WPF 更改父 UserControl 中的文本
- kubernetes - Kubernetes 用户界面仪表板
- javascript - 尽管在 main.js 之前加载了 jquery,但未定义 jquery $
- sed - 使用 sed 提取 /dev/nvme0 设备的 UUID
- php - 在 PHP 中使用 foreach-array 显示最接近的发布日期标题