条件注释判断兼容浏览器版本CSS HACK !--[if !IE]!--[if IE]!--[if lt IE 6]!--[if gte IE 6]...
<!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]-->
<!--[if IE]> 所有的IE可识别 <![endif]-->
<!--[if IE 6]> 仅IE6可识别 <![endif]-->
<!--[if lt IE 6]> IE6以及IE6以下版本可识别 <![endif]-->
<!--[if gte IE 6]> IE6以及IE6以上版本可识别 <![endif]-->
<!--[if IE 7]> 仅IE7可识别 <![endif]-->
<!--[if lt IE 7]> IE7以及IE7以下版本可识别 <![endif]-->
<!--[if gte IE 7]> IE7以及IE7以上版本可识别 <![endif]-->
<!--[if IE 8]> 仅IE8可识别 <![endif]-->
<!--[if IE 9]> 仅IE9可识别 <![endif]-->
项目 | 范例 | 说明 |
---|---|---|
! | [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. NOT运算符。这是摆立即在前面的功能,操作员,或子表达式扭转布尔表达式的意义。 |
lt | [if lt IE 5.5] |
The less-than operator. Returns true if the first argument is less than the second argument. 小于运算符。如果第一个参数小于第二个参数,则返回true。 |
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. 小于或等于运算。如果第一个参数是小于或等于第二个参数,则返回true。 |
gt | [if gt IE 5] |
The greater-than operator. Returns true if the first argument is greater than the second argument. 大于运算符。如果第一个参数大于第二个参数,则返回true。 |
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. 大于或等于运算。如果第一个参数是大于或等于第二个参数,则返回true。 |
( ) | [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 AND运算符。如果所有的子表达式计算结果为true,返回true |
| | [if (IE 6)|(IE 7)] |
The OR operator. Returns true if any of the subexpressions evaluates to true. OR运算符。返回true,如果子表达式计算结果为true。 |
<!--[if lt IE 9]>
加载CSS1
<!--[else]>
加载CSS2
<![endif]-->
这样有效是有效,但是用HTML VALIDATOR里,报错,因为这个不符合XHTML 1.1的规范,
如果把ELSE语句去掉,则正确.
方法1:
加载CSS2
<!--[if lt IE 9]>
加载CSS1(可以把要重写的写在这里).
<![endif]-->
转载请注明:http://www.tea119.com
转载于:https://www.cnblogs.com/wshiqtb/archive/2013/05/27/3101214.html
条件注释判断兼容浏览器版本CSS HACK !--[if !IE]!--[if IE]!--[if lt IE 6]!--[if gte IE 6]...相关推荐
- PS常用工具、常见的图片格式和特点、 IE 浏览器常见兼容问题、CSS Hack
PS常用工具常见的图片格式和特点. IE 浏览器常见兼容问题.CSS Hack PS常用工具 移动工具 移动工具主要负责图层.选区.等的移动.复制操作. 快捷键:v 抓手工具 快捷键:h 空格 + 鼠 ...
- 条件注释判断浏览器!--[if !IE]!--[if IE]!--[if lt IE 6]!--[if gte IE 6]
条件注释判断浏览器<!--[if !IE]><!--[if IE]><!--[if lt IE 6]><!--[if gte IE 6]> <!- ...
- 浏览器专属 CSS Hack:区分 Firefox / Opera / Safari / Internet Explorer
浏览器专属 CSS Hack:区分 Firefox / Opera / Safari / Internet Explorer CSS Hack 是在标准 CSS 没办法兼容各浏览器显示效果时才会用上的 ...
- 区别不同浏览器,CSS hack写法
区别不同浏览器,CSS hack写法: 区别IE6与FF: background:orange;*background:blue; 区别IE6与IE7: background:green !impor ...
- 原生js判断IE浏览器版本
// 判断IE浏览器版本function IEVersion() {var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串 var isIE ...
- 判断IE浏览器版本(IE10+)
判断IE浏览器版本(IE10+) 项目不支持低版本的IE,在登录的时候通过判断浏览器版本,寄语人性化的提示,具体实现如下 可以写在在公共函数文件里,到时候直接 import { IEVersion } ...
- 判断当前浏览器版本ie浏览器跳转谷歌浏览器
判断当前浏览器版本ie浏览器跳转谷歌浏览器 在 vue 项目 index.html中 添加 function getOs() { if (navigator.userAgent.indexOf(&qu ...
- jquery判断ie浏览器版本
jquery判断ie浏览器版本 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 < script type ...
- 针对IE6\7\8\9\10浏览器的CSS hack大全详解
目前IE内核浏览器仍然是国内主流浏览器,占据着PC浏览器的大部分市场份额,版本从IE6到IE10,所有前段工作者都必须面对和解决多个IE浏览器对代码的兼容性问题.在很多情况下,我们需要专门针对IE写c ...
最新文章
- java xml特殊字符处理_dom4j特殊字符处理
- python一点基础都没有的怎么办-你们都是怎么学 Python 的?
- Maven使用原型插件来创建项目
- Linux下防火墙开放端口
- 太原理工大学linux与python编程r实验报告_太原理工大学算法设计与分析实验报告...
- js关于浅拷贝、深拷贝,数组的深拷贝
- 爱的十个秘密--10.热情的力量
- linux gnome_GNOME,生日快乐:喜欢这个Linux桌面的8个理由
- 【Java开发规范】禁止在 foreach 循环里进行元素的 remove/add 操作
- 分治法 —— 快速排序和归并排序(自底向上和自顶向下)
- 【人工智能项目】sg2im文字转图像
- html 链接长宽,CSS实现长宽比的几种方案【转载】
- android 夜间模式源码,Android Support Library 之 夜间模式
- 从零开始做自媒体短视频,新手一样可以操作!每月稳定5000多
- 赶集网CEO杨浩涌向搜狐IT确认
- RocketMQ 安装与启动
- bootstrap4--表格和网格系统
- Windows驱动_文件系统微小过滤驱动之二驱动的安装和加载
- GOOGLE HACKING 系列文章
- 『Tricks』用Python批量获取地理位置的经纬度信息