判断浏览器的条件

if IE什么意思呢?下面就列举了一些在CSS常见的HACK控制语句。   作为IE的IF条件注释使用备忘,大家可以参考,有经验欢迎与网友分享。   

<!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]-->   

<!--[if IE]> 所有的IE可识别 <![endif]-->   

<!--[if IE 5.0]> 只有IE5.0可以识别 <![endif]-->   

<!--[if IE 5]> 仅IE5.0与IE5.5可以识别 <![endif]-->   

<!--[if gt IE 5.0]> IE5.0以及IE5.0以上版本都可以识别 <![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 6]> <link rel="stylesheet" type="text/css" href="IE-6-SPECIFIC.css" /> <![endif]-->

<![if !IE]> 非IE <link rel="stylesheet" type="text/css" href="REAL-STYLESHET.css" /> <![endif]>

<![if !IE]> <link rel="stylesheet" type="text/css" href="css/not-ie.css" media="screen"/> <![endif]>

在样式中嵌入: You must fix your CC into commentsigns like this: <!--[if lt IE 7]>a.menu{height:0;}<![endif]-->

 

zhuan: http://liuxiaot2005.3.12.blog.163.com/blog/static/22145142200961511223888/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值