http://msdn.microsoft.com/en-us/library/ms537512(VS.85).aspx

http://www.quirksmode.org/css/condcom.html

Item Example Comment
! [if !IE] The NOT operator. This is placed immediately in front of the feature, operator, or subexpression to reverse the Boolean meaning of the expression.
lt [if lt IE 5.5] The less-than operator. Returns true if the first argument is less than the second argument.
lte [if lte IE 6] The less-than or equal operator. Returns true if the first argument is less than or equal to the second argument.
gt [if gt IE 5] The greater-than operator. Returns true if the first argument is greater than the second argument.
gte [if gte IE 7] The greater-than or equal operator. Returns true if the first argument is greater than or equal to the second argument.
( ) [if !(IE 7)] Subexpression operators. Used in conjunction with Boolean operators to create more complex expressions.
& [if (gt IE 5)&(lt IE 7)] The AND operator. Returns true if all subexpressions evaluate to true
| [if (IE 6)|(IE 7)] The OR operator. Returns true if any of the subexpressions evaluates to true.

<!--[if gte IE 7]>
<SCRIPT LANGUAGE="javascript">
alert("Congratulations! You are running Internet Explorer 7 or a later version of Internet Explorer.");
</SCRIPT>
<P>Thank you for closing the message box.</P>
<![endif]-->
<!--[if IE]><p>You are using Internet Explorer.</p><![endif]-->
<![if !IE]><p>You are not using Internet Explorer.</p><![endif]> <!--[if IE 7]><p>Welcome to Internet Explorer 7!</p><![endif]-->
<!--[if !(IE 7)]><p>You are not using version 7.</p><![endif]--> <!--[if gte IE 7]><p>You are using IE 7 or greater.</p><![endif]-->
<!--[if (IE 5)]><p>You are using IE 5 (any version).</p><![endif]-->
<!--[if (gte IE 5.5)&(lt IE 7)]><p>You are using IE 5.5 or IE 6.</p><![endif]-->
<!--[if lt IE 5.5]><p>Please upgrade your version of Internet Explorer.</p><![endif]--> <!--[if true]>You are using an <em>uplevel</em> browser.<![endif]-->
<![if false]>You are using a <em>downlevel</em> browser.<![endif]> <!--[if true]><![if IE 7]><p>This nested comment is displayed in IE 7.</p><![endif]><![endif]-->

Css:Conditional comments 条件注释的更多相关文章

  1. HTML下在IE浏览器中的专有条件注释

    在进行WEB标准网页的学习和应用过程中,网页对浏览器的兼容性是经常接触到的一个问题.其中因微软公司的Internet Explorer(简称IE)占据浏览器市场的大半江山,此外还有Firefox.Op ...

  2. ie10 css hack 条件注释等兼容方式整理

    点评:ie10已经上线一段时间了,相信已经有一部分前端潮人体验过了,截至到现在,在ie6到ie9的浏览器各种各样的古怪行为,开发人员不得不使用条件注释,有条件的类,和其他特定于IE的css hack来 ...

  3. CSS条件注释

    由于浏览器版本的不同,对CSS里某些元素的解释也不一样,针对浏览器版本不同而选择不同CSS的代码,其实我们还可以利用条件注释的方法来达到类似的目的,什么是条件注释,在此简单介绍一下,无非就是一些if判 ...

  4. 关于CSS中对IE条件注释的问题

    一.通用区分方式:IE6.IE7能识别*,标准浏览器(如FF)不能识别*:IE6能识别*,但不能识别 !important:IE7能识别*,也能识别 !important:IE8能识别\0,不能识别* ...

  5. 前端备忘录 — IE 的条件注释

    CSS hack 由于不同厂商的浏览器,比如 Internet Explorer,Safari,Mozilla Firefox, Chrome 等,或者是同一厂商的浏览器的不同版本,如 IE6 和 I ...

  6. 浏览器兼容处理(HTML条件注释、CSSHack和JS识别)

    前面的话 本文中所有IEx+代表包含x及x以上:IEx-代表包含x及x以下,仅个人习惯.例:IE7+代表IE7.IE8…… 本文中所有例子全部经过测试,欢迎交流. HTML识别 条件注释法(IE10+ ...

  7. IE条件注释详解

    IE条件注释是微软从IE5开始就提供的一种非标准逻辑语句,作用是可以灵活的为不同IE版本浏览器导入不同html元素,如:样式表,html标签等.很显然这种方法的最大好处就在于属于微软官方给出的兼容解决 ...

  8. IE中的条件注释(转载自网络)

    IE条件注释是微软从IE5开始就提供的一种非标准逻辑语句,作用是可以灵活的为不同IE版本浏览器导入不同html元素,如:样式表,html标签等.很显然这种方法的最大好处就在于属于微软官方给出的兼容解决 ...

  9. HTML中的IE条件注释

    IE条件注释是一种特殊的HTML注释,这种注释只有IE5.0及以上版本才能理解.比如普通的HTML注释是: <!--This is a comment--> 而只有IE可读的IE条件注释是 ...

随机推荐

  1. IntelliJ IDEA 把Maven项目导出可执行jar包

    2017年04月05日 14:05:08 waterimelon 阅读数:1574 标签: intellij ideamaven 更多 个人分类: idea   第一步  第二步  第三步 

  2. Python之freshman01

    列表与元组.字典 1.列表list:["ele1","ele2","ele3","ele0"] 列表是一组任意类型的值, ...

  3. 006 Android XML 文件布局及组件属性设置技巧汇总

    1.textview 组件文本实现替换(快速实现字符资源的调用) android 应用资源位置在 project(工程名)--->app--->res--->values 在stri ...

  4. 服务端 安装配置 svn

    检查是否安装svn svn --version 看看,既能确定是否安装,又能确定版本多少 安装 svn yum -y install subversion 创建仓库存放目录 mkdir -p /opt ...

  5. windows使用putty工具 进行【复制】,【粘贴】操作

    #复制# 按住鼠标左键,执行选择,放开左键时完成复制 #粘贴# 点击鼠标右键,执行粘贴

  6. Windows 环境 ABP前端运行 ng test 无法执行

    Command: ng test Error Information: Schema validation failed with the following errors: Data path &q ...

  7. Kibana6.x.x源码结构分析笔记

  8. 洛谷 P4093 [HEOI2016/TJOI2016]序列(Cdq+dp)

    题面 luogu 题解 \(Cdq分治+dp\) \(mx[i],mn[i]\)分别表示第\(i\)位最大,最小能取到多少 那么有 \(j < i\) \(mx[j] \le a[i]\) \( ...

  9. Visual Studio Ultimate 2013 免费下载地址

    ed2k://|file|cn_visual_studio_2010_ultimate_x86_dvd_532347.iso|2685982720|4AE6228933DDE49D9BFA4C3467 ...

  10. html的第一个程序

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...