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

<!--[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里的不等于判断符相同

posted @ 2018-02-09 09:58  pheosia  阅读(383)  评论(0编辑  收藏  举报