各瀏覽器CSS hack

2021-04-19 23:46:41 字數 871 閱讀 6040

區別 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;

ie6ie7ff*

√√×!important×√

√另外再補充乙個,下劃線"

_",ie6支援下劃線,ie7和firefox均不支援下劃線。

於是大家還可以這樣來區分

ie6,

ie7,

firefox

: background:

orange;

*background:

green;

_background:

blue;

注:不管是什麼方法,書寫的順序都是firefox的寫在前面,ie7的寫在中間,ie6的寫在最後面。

css hack, 瀏覽器 選擇

ie6以下 html ie 7 以下 first child html html 只對ie 7 first child html 只對ie 7 和現代瀏覽器 html body 只對現代瀏覽器 非ie 7 html body 最新的opera 9以下版本 html first child safar...

css hack, 瀏覽器 選擇

ie6以下 html ie 7 以下 first child html html 只對ie 7 first child html 只對ie 7 和現代瀏覽器 html body 只對現代瀏覽器 非ie 7 html body 最新的opera 9以下版本 html first child safar...

瀏覽器 CSS Hack 收集

所謂的hack就是只有特定瀏覽器才能識別這段hack hack 不是什麼好東西,除非沒有辦法,我們盡量還是不要用著玩意。下面是各個瀏覽器的css hack 列表。moz document url prefix 支援所有gecko核心的瀏覽器 包括firefox selector media scre...