CSS hack:区分IE6 IE7 Firefox
生活随笔
收集整理的這篇文章主要介紹了
CSS hack:区分IE6 IE7 Firefox
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
區別不同瀏覽器,CSS hack寫法:
區別IE6與FF: background:orange;*background:blue;
區別IE6與IE7: background:green?!important;background:blue;
區別IE7與FF: background:orange;?*background:green;
區別FF,IE7,IE6: background:orange;*background:green?!important;*background:blue;
注: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的寫在最后面。
轉載于:https://www.cnblogs.com/yongzhi/articles/1187207.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的CSS hack:区分IE6 IE7 Firefox的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CSS样式(行间)
- 下一篇: 软件质量 软件测试和质量保证