当前位置: 代码网 > it编程>网页制作>Css > IE hack条件写法

IE hack条件写法

2024年05月18日 Css 我要评论
最近制作下拉菜单时,打算用纯css,忽又看到令人头痛的css hack代码(平时很少关注),记录下来以作备用。 <!–[if lte ie 6]>………….<![endif]–>
最近制作下拉菜单时,打算用纯css,忽又看到令人头痛的css hack代码(平时很少关注),记录下来以作备用。

<!–[if lte ie 6]>………….<![endif]–>

ite:less than or equal to意思是小于或等于ie6浏览器,用于ie浏览器的条件注释,常用于csshack,针对ie的js等。

以下是各种情况,未验证。


1. <!–[if !ie]><!–> 除ie外都可识别 <!–<![endif]–>
2. <!–[if ie]> 所有的ie可识别 <![endif]–>
3. <!–[if ie 5.0]> 只有ie5.0可以识别 <![endif]–>
4. <!–[if ie 5]> 仅ie5.0与ie5.5可以识别 <![endif]–>
5. <!–[if gt ie 5.0]> ie5.0以及ie5.0以上版本都可以识别 <![endif]–>
6. <!–[if ie 6]> 仅ie6可识别 <![endif]–>
7. <!–[if lt ie 6]> ie6以及ie6以下版本可识别 <![endif]–>
8. <!–[if gte ie 6]> ie6以及ie6以上版本可识别 <![endif]–>
9. <!–[if ie 7]> 仅ie7可识别 <![endif]–>
10. <!–[if lt ie 7]> ie7以及ie7以下版本可识别 <![endif]–>
11. <!–[if gte ie 7]> ie7以及ie7以上版本可识别 <![endif]–>
(0)

相关文章:

版权声明:本文内容由互联网用户贡献,该文观点仅代表作者本人。本站仅提供信息存储服务,不拥有所有权,不承担相关法律责任。 如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 2386932994@qq.com 举报,一经查实将立刻删除。

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com