display:none 不适用于 Outlook 2007 [英] display:none doesn't work on Outlook 2007

查看:35
本文介绍了display:none 不适用于 Outlook 2007的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从我们的系统向客户发送一封电子邮件,其中一些标签应该对他们隐藏.我设置了以下 CSS:

I want to send an e-mail from our system to customers, where some tags should be hidden to them. I've set the following CSS:

.hidden { display: none; }

但这行不通.在电子邮件中隐藏元素有哪些解决方案或替代方案?

But this does not work. What solutions or alternatives are there for hiding elements in an e-mail?

推荐答案

Outlook 2007 使用 Microsoft Word 引擎呈现 HTML,该引擎对 CSS 的支持非常有限.此页面 描述了您可以期望工作的类型(display 是不支持"的一种.

Outlook 2007 uses the Microsoft Word engine for rendering HTML which has very limited support for CSS. This page describes the kind of things you can expect to work (display is one of the "not supported" ones).

不幸的是,您无能为力.您可以将元素括在 HTML 注释 <!-- ... --> 中,这将阻止它呈现,但仅此而已.

Unfortunately, there's not much you can do. You can enclose the element in HTML comments <!-- ... --> which would stop it from rendering, but that's about it.

这篇关于display:none 不适用于 Outlook 2007的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆