开发者

Targets for conditional comments in html?

开发者 https://www.devze.com 2023-03-07 17:56 出处:网络
I know you can target browsers with conditional comments, as explained here in MSDN. But I just saw one that looked like this <!--[if gte mso 9]>

I know you can target browsers with conditional comments, as explained here in MSDN.

But I just saw one that looked like this <!--[if gte mso 9]>

What does this check for and what (other than browsers) can you check for with conditional comments?

EDIT

Is there any documentation on the conditional comm开发者_如何学Cents. What options and what version numbers you can use?

mso = Microsoft Outlook

9 = 2007


It is used for targeting Microsoft Outlook 2007 and later in HTML emails. See this article for details.


This German version of Wikipedia lists the various targets (IE, Microsoft Office, and VML).

http://de.wikipedia.org/wiki/Conditional_Comments (You will need to Google translate)

Also, this post suggests that MS Publisher can also be targeted

http://www.adras.com/can-t-view-page-in-browser.t32980-10-2.html


     1.   <!--[if IE 8]>
        <p>Welcome to Internet Explorer 8.</p>
        <![endif]-->


      2.  <![if lt IE 8]>
        <p>Please upgrade to Internet Explorer version 8.</p>
        <![endif]>
// include this too
This is <comment>not</comment> Internet Explorer
  1. firefox - print - nothing

    IE 8 - print - Welcome to Internet Explorer 8.

  2. Firefox - print - Please upgrade to Internet Explorer version 8.

    IE 8 - pirnt - nothing but Welcome to Internet Explorer 8. if inclcded.

<!-- comment inner HTML Also while

<! will not comment inner HTML. as in FIREFOX example.

0

精彩评论

暂无评论...
验证码 换一张
取 消