如何为非IE浏览器编写条件注释? [英] How to write conditional comment for non IE browsers?

查看:103
本文介绍了如何为非IE浏览器编写条件注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不想为IE 6/7使用几个JavaScript插件。
但是我想将它们用于所有其他浏览器。

I don't want to use a couple of javascript plugins for IE 6/7. But I want to use them for all other browsers.

我该怎么做?
有没有什么办法可以做到这一点?

How can I do it? Is there any way I can do it?

推荐答案

维基百科关于条件评论的文章(修改为适合您的版本要求):

From the Wikipedia article on conditional comments (modified to fit your version requirements):

<!--[if gt IE 7]><!-->
<p>This code displays on non-IE browsers and on IE 8 or higher.</p>
<!--<![endif]-->

第一行的怪异标记符合标记标准。

The weird markup in the first line serves to make the markup standards compliant.

这篇关于如何为非IE浏览器编写条件注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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