CSS hack:區(qū)分IE6,IE7,firefox
CSS hack:區(qū)分IE6,IE7,firefox
區(qū)別不同瀏覽器,CSS hack寫(xiě)法:
區(qū)別IE6與FF:
background:orange;*background:blue;
區(qū)別IE6與IE7:
background:green !important;background:blue;
區(qū)別IE7與FF:
background:orange; *background:green;
區(qū)別FF,IE7,IE6:
background:orange;*background:green !important;*background:blue;
注:IE都能識(shí)別*;標(biāo)準(zhǔn)瀏覽器(如FF)不能識(shí)別*;
IE6能識(shí)別*,但不能識(shí)別 !important,
IE7能識(shí)別*,也能識(shí)別!important;
FF不能識(shí)別*,但能識(shí)別!important;
IE6 | IE7 | FF | |
* | √ | √ | × |
!important | × | √ | √ |
_ | √ | × | × |
# |
× | √ | × |
另外再補(bǔ)充一個(gè),下劃線(xiàn)"_",
IE6支持下劃線(xiàn),IE7和firefox均不支持下劃線(xiàn)。
于是大家還可以這樣來(lái)區(qū)分IE6,IE7,firefox
: background:orange;*background:green;_background:blue;
注:不管是什么方法,書(shū)寫(xiě)的順序都是firefox的寫(xiě)在前面,IE7的寫(xiě)在中間,IE6的寫(xiě)在最后面。
相關(guān):
- 在windows XP下面同時(shí)安裝IE6,IE7和firefox
(firefox的不同版本間可以共存,但是IE的不同版本之間不能共存,本文主要是解決將IE6和IE7安裝到同一個(gè)XP系統(tǒng)里面去的問(wèn)題)
- CSS的各種瀏覽器兼容一欄表
posted on 2010-02-10 16:14 lau 閱讀(437) 評(píng)論(2) 編輯 收藏 所屬分類(lèi): Web