自己總結中 css hack

來源:互聯網
上載者:User

 

類內部Hack:

            IE6 識別底線 _  和 *

            IE7 識別  *                           (不能識別 _ )

            FF兩個都不能識別

 

選取器Hack:

            IE6能識別    *html

            IE7能識別    *+html  或 *:first-child+html 

 

HTML頭部引用(if IE)Hack:

           所有IE:<!--[if IE]><!--您的代碼--><![endif]-->,

           IE6及以下版本:<!--[if lt IE 7]><!--您的代碼--><[endif]-->           這類Hack不僅對CSS生效,對寫在判斷語句裡面的所有代碼都 會生效。

 

 

 萬能的清楚CSS:

.clearfix:after { content:"."; display:block; height:0; clear:both; visibility:hidden; }

.clearfix { display:inline-block; }

/* Hide from IE Mac */

.clearfix {display:block;}

/* End hide from IE Mac */

 

 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.