css hack, 瀏覽器 選擇

2021-04-20 00:44:23 字數 934 閱讀 4213

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 {}

safari

html[xmlns*=」"] body:last-child {}

firefox 3

.classname, x:-moz-any-link, x:default {}

#id, x:-moz-any-link, x:default {}

********************

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

區別ff 3

「{」前加上「, x:-moz-any-link, x:default」,只有ff 3能識別

注:ie都能識別*;標準瀏覽器(如ff)不能識別*;

ie6能識別*,但不能識別 !important,

ie7能識別*,也能識別!important;

ff不能識別*,但能識別!important;

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與 ff background orange background blue 區別 ie6與 ie7 background green important background blue 區別 ie7與 ff background orange background green 區別 f...

瀏覽器 CSS Hack 收集

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