是否有针对 Outlook 以外的所有内容的 html 条件语句?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5982364/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is there a html conditional statement for everything not Outlook?
提问by David Nguyen
I found a snippet of code that allows me to target clients that have outlook 2007 or higher.
我找到了一段代码,它允许我定位具有 Outlook 2007 或更高版本的客户。
<!--[if gte mso 9]><![endif]-->
<!--[if gte mso 9]><![endif]-->
Is there anyway to target everything but outlook or outlook 2007 & higher? If you're giving an answer please give working code as I've tried
无论如何,除了展望或展望 2007 年及更高版本之外,是否还有其他目标?如果您要给出答案,请提供我尝试过的工作代码
<!--[if ! mso 9]>
<!--[if ! mso]>
<!--[if !(mso)]>
<!--[if ! mso 9]>
<!--[if ! mso]>
<!--[if !(mso)]>
None of the following worked in Gmail with firefox.
以下所有内容均不适用于带有 Firefox 的 Gmail。
回答by Will Peavy
Try this:
尝试这个:
<!--[if !mso]>-->
content targeted at non-outlook users goes here...
<!--<![endif]-->
回答by seanjacob
To prevent statements being stripped in outlook.com, change <!-->
to <!-- -->
-
为防止在 Outlook.com 中删除声明,请更改<!-->
为<!-- -->
-
<!--[if !mso]><!-- -->
All Except MSO 07-13
<!--<![endif]-->
回答by Stuart W
Super late response, but hopefully this will help someone. This worked for me:
超级迟到的回复,但希望这会对某人有所帮助。这对我有用:
<!--[if !gte mso 9]><!---->
<p>I'm not Outlook 2007/2010.</p>
<!--<![endif]-->
Edit: Answered above, but extra tags on the IF statement are to hide the tags from being revealed in IE7/8.
编辑:上面已回答,但 IF 语句中的额外标签是为了隐藏标签,以免在 IE7/8 中显示。
回答by jhsilva007
That's is a solution:
这是一个解决方案:
<!--[if !mso]><!-->
content without use in IE or Outlook
<!--<![endif]-->
I think so you can first resolve in IE, Outlook and denied with this for putting the elementss for all differents clients for email without Outlook.
我认为您可以首先在 IE、Outlook 中解析,然后拒绝使用此方法将所有不同客户端的元素放在没有 Outlook 的电子邮件中。
regards
问候
回答by jolt
That's not how you have to use it. Instead it is, for everything except Outlook
- normal routine, for Outlook
- do specific. Not the other way around like you're trying to do.
这不是你必须如何使用它。取而代之的是,for everything except Outlook
- 正常的例行程序,for Outlook
- 做具体的事情。不像你试图做的那样。
回答by c-smile
Conditionals in comments like <!--[if gte mso 9]...
is IE specific. Will not work in other browsers.
评论中的条件<!--[if gte mso 9]...
是 IE 特定的。在其他浏览器中不起作用。