ie 条件注释判断语句是 ie 特有的功能,通过 html 注释中的条件语句能让不同的 ie 版本识别注释中的内容
自ie10起,标准模式不再支持条件注释
条件注释语句中可以是html、css也可以是javascript,空格和大写不要写错
1.只能被 ie 识别
<!--[if ie]>
只能被 ie 识别;
<![endif]-->
2.ie6
<!--[if ie 6]>
这是ie6
<![endif]-->
3.ie7
<!--[if ie 7]>
这是ie7
<![endif]-->
4.ie8
<!--[if ie 8]>
这是ie8
<![endif]-->
5.ie9
<!--[if ie 9]>
这是ie9
<![endif]-->
6.高于ie6
<!--[if gt ie 6]>
这是大于ie6
<![endif]-->
也可以有下面这几种写法
<!--
gt(reater than) 大于
gte(greater than or equal)大于等于
lt(less than) 小于
lte(less than or equal) 小于等于
! 非
-->
如对本文有疑问, 点击进行留言回复!!
荐 微信小程序动态评分展示/五角星展示/半颗星展示/自定义长度展示
深入理解CSS background-blend-mode的作用机制
网友评论