css hack 区分ie6.0 ie7.0 firesox的各种写法
作者:Levone 来源:source 【大 中 小】 浏览: 添加日期:2008-06-30 我要评论(3)
区别IE6与FF:
background:orange;*background:blue;
区别IE6与IE7:
区别IE6与IE7:
background:green !important;background:blue;
区别IE7与FF:
区别IE7与FF:
background:orange; *background:green;
区别FF,IE7,IE6:
区别FF,IE7,IE6:
background:orange;*background:green !important;*background:blue;
注:IE都能识别*;标准浏览器(如FF)不能识别*;
注:IE都能识别*;标准浏览器(如FF)不能识别*;
IE6能识别*,但不能识别 !important,
IE7能识别*,也能识别!important;
FF不能识别*,但能识别!important;
| IE6 | IE7 | FF | |
| * | √ | √ | × |
| !important | × | √ | √ |
另外再补充一个,下划线"_",
IE6支持下划线,IE7和firefox均不支持下划线。
于是大家还可以这样来区分IE6,IE7,firefox
: background:orange;*background:green;_background:blue;
注:不管是什么方法,书写的顺序都是firefox的写在前面,IE7的写在中间,IE6的写在最后面。
(如果您觉得本站不错,请告诉身边的朋友,或转载到论坛、百度知道、贴吧等,记得带网址哟,不胜感激!)
〖WEB标准〗Tags: css hack 浏览器兼容 hack
所属专题:CSS HACK
相关文章
更多评论(3)..会员评论
- hgangan(123.117.*.*) 发表于:2011-04-30 14:47:41
- 用ietester测试 !important IE7不支持 居然ie6也支持 是软件有问题吗?
- 管理员回复:好像就是针对IE6的
- hgangan(123.117.*.*) 发表于:2011-04-30 14:44:14
- 用*background:blue; 测试body背景 IE7 IE8 FF 都不支持 只有IE6支持
- 管理员回复:注意书写顺序
- 稻草人(123.112.*.*) 发表于:2009-05-07 18:00:20
- 上面的写法有错误吧我都试过了怎么没有反应啊...
- 管理员回复:我一般没用到第三种方法。
推荐文章
热门文章
最新评论文章
推荐专题
在线交流QQ群
- 106310407(开)
- 55427134(开)
- 2993401(开)
- 30235673(开)
- 33424604(开)
- 2993401(开)
- 161512108(开)
- 161510519(开)
- 158375021(开)
- 155858414(开)
- 143309878(开)
- 16373807(开)
- 129098721(开)
- 123473199(开)
- 146991009(开)
- 135792800(开)
