調css支援firefox IE6 IE7的方法

2022-09-12 12:57:21 字數 558 閱讀 9396

**例子:

#bg

*+html #bg

在調css的支援順序 firefox->ie6->ie7

1.先支援firefox

在firefox中帶 !important 屬性是是最高的優先順序 (ie6、ie7 不能識別)。

所以在上面的**片段中firefox識別後的width引數因該是width:100%

2.ie支援

2.1 在ie6中由於不能解析!important 屬性所以ie6會拋棄這個設定 然後解析後面個width:180%

所以在上面的**片段中ie6識別後的width引數因該是width:180%

2.2在ie7中同樣不能解析!important 屬性所以ie7會拋棄這個設定 然後解析後面個width:180%,之後有個ie7特有的*+html (元素屬性結束後還要跟上!important,也就是說當*+html 和!important同時使用時才是ie7獨有能識別的),所以後設定的width:180%將覆蓋先前設定的width:180%

所以在上面的**片段中ie7識別後的width引數因該是width:180%

Firefox IE對CSS的相容性整理

1 firefox和ie對某些css樣式的認定有不少區別,包括 ul和ol的預設padding值是不一樣的,在firefox中,padding left預設值為40px左右,而ie中為0,一般設定ul就能解決大部分問題。並列排列的多個元素 或者鏈結 的 中的空格和回車會造成元素之間的間隙,而在fir...

線上Tomcat支援Eclipse遠端除錯的方法

在bin catalina.sh,開啟 在第一行粘入 declare x catalina opts xdebug xrunjdwp transport dt socket,server y,suspend n,address 8000 在myeclipse中,右鍵點選對應的web project ...

支援向量機SVM案例與調參

from sklearn.datasets import load breast cancer from sklearn.svm import svc from sklearn.model selection import train test split import matplotlib.pyp...