相關文章:網頁在ie6下正常在ie7下錯位的問題
問:
ie6網頁顯示錯位,ie7顯示正常
我用dreamweaver制作的靜態頁面,div+css格式的,在ie7.0瀏覽器和火狐瀏覽器中顯示都很正常,但是在ie6.0中顯示就不正常,這是怎么回事呀,請高手幫忙?!
答:
區別不同瀏覽器,css hack寫法:
區別ie6與ff:
backgroundrange;*background:blue;
區別ie6與ie7:
background:green !important;background:blue;
區別ie7與ff:
backgroundrange; *background:green;
區別ff,ie7,ie6:
backgroundrange;*background:green !important;*background:blue;
注:ie都能識別*;標準瀏覽器(如ff)不能識別*;
ie6能識別*,但不能識別 !important,
ie7能識別*,也能識別!important;
ff不能識別*,但能識別!important;
另外再補充一個,下劃線"_",
ie6支持下劃線,ie7和firefox均不支持下劃線。
于是大家還可以這樣來區分ie6,ie7,firefox
: background:orange;*background:green;_background:blue;
新聞熱點
疑難解答