做網站時經常會用到,衡量一個DIV+CSS架構師的水平時,這個也很重要。
區別不同瀏覽器的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;