Is there a html conditional statement for everything not Outlook?

后端 未结 7 1494
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-30 10:52

I found a snippet of code that allows me to target clients that have outlook 2007 or higher.

Is there an

相关标签:
7条回答
  • 2021-01-30 11:07

    To prevent statements being stripped in outlook.com, change <!--> to <!-- --> -

    <!--[if !mso]><!-- -->
        All Except MSO 07-13
    <!--<![endif]-->
    
    0 讨论(0)
  • 2021-01-30 11:08

    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.

    0 讨论(0)
  • 2021-01-30 11:14

    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.

    regards

    0 讨论(0)
  • 2021-01-30 11:15

    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.

    0 讨论(0)
  • 2021-01-30 11:20

    Microsoft defines a way to write conditional HTML that will be revealed in those clients that don't understand Microsoft's proprietary "conditional comments":

    <![if !mso]> HTML meant for non-Outlook clients <![endif]>

    They call it a "downlevel-revealed conditional comment", though it's not actually a comment at all, since comments start with <!--. Microsoft Office and Internet Explorer process the conditional statement (!mso evaluates false in Outlook), while other clients ignore the unrecognized tags. See Microsoft's documentation on conditional comments.

    0 讨论(0)
  • 2021-01-30 11:23

    Try this:

    <!--[if !mso]>-->
      content targeted at non-outlook users goes here...
    <!--<![endif]-->
    
    0 讨论(0)
提交回复
热议问题