您的位置:首页 > 其它

条件注释判断IE浏览器,<!--[if IE]>条件注释区分非IE浏览器

2014-09-17 14:10 218 查看
<!--[if IE]> Only IE <![endif]-->

所有的IE可识别

<!--[if IE 5.0]> Only IE 5.0 <![endif]-->

只有IE5.0可以识别

<!--[if gt IE 5.0]> Only IE 5.0+ <![endif]-->

高于IE5.0都可以识别

<!--[if lt IE 6]> Only IE 6- <![endif]-->

低于IE6可识别

<!--[if gte IE 6]> Only IE 6/+ <![endif]-->

IE6以及IE6以上都可识别

<!--[if lte IE 7]> Only IE 7/- <![endif]-->

IE7及ie7以下版本可识别

<!--[if (gte IE 9)|!(IE)]><!--><html> <!--<![endif]-->

大于等于ie9或者非ie浏览器

lte:就是Less than or equal to的简写,也就是小于或等于的意思。

lt :就是Less than的简写,也就是小于的意思。

gte:就是Greater than or equal to的简写,也就是大于或等于的意思。

gt :就是Greater than的简写,也就是大于的意思。

! :就是不等于的意思,跟javascript里的不等于判断符相同
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐