區別不同瀏覽器,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的寫在最後面。
2009年12月2日 星期三
[筆記][CSS Hack] 區分各ie及firefox的css
引述自CSS hack:區分IE6,IE7,firefox-網站標準化:
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言