現象:
IE6下浮動元素和不浮動元素之間會有3px間隙(3px bug,div.float-left + div.float-none)css
解決
需設置 div.float-left{ margin-right:-3px;}html
* html
IE6認爲最外層的元素不是html ,而是* 。 html是*的子元素
.abc.aclassSelector{} (不存在樣式成分忽略 IE6=)瀏覽器
*+html selector{}
IE7firefox
selector,{} (IE6/7 並列關係符不當 包容)code
前綴 *
只有 IE6/7能識別 *padding-left:50px;
htm
前綴_
_margin-right:-3px;
IE6 onlyclass
!important
(只有IE6不起提高優先級的做用)
padding-left:50 !important; IE 7/8/9/firefox遇到 !important將提高該樣式屬性的優先級,IE 6能識別 !important 但沒有提高樣式屬性優先級的做用。import
\9
(只有IE能識別)
padding-left:50px \9;
IEhack \9,全部IE瀏覽器都識別 \9select
IE 6 css hack : * html, _height, color:blue !important; color:red;
hack
IE 6/7 css hack: *height:100px;
IE css hack: height:100px \9;