IE6/IE7/IE8/Firefox專屬CSS hack

來源:互聯網
上載者:User

文章簡介:當我把第五行注視掉後,IE6顯示的是green的顏色;即使是把\0改為\9結果還是一樣;也就是說此時IE6顯示的效果和IE7的相同,但是IE6是不支援 !important;百思不得其解;這也算是一個hack吧。

.bgtest{
 
        background:orange;/*==FF==*/
 
        background:yellow\0;/*==IE8==*/
 
        * background:green !important;/*==ie7==*/
 
        * background:blue;/*==IE6==*/
 
        width:300px;
 
        height:300px;
 
}

測試結果在各個瀏覽器顯示正常
 因為玩過hack的人知道在IE中\0是IE8的專屬hack
 當我把第五行注視掉後,IE6顯示的是green的顏色;即使是把\0改為\9結果還是一樣;也就是說此時IE6顯示的效果和IE7的相同,但是IE6是不支援 !important;百思不得其解;這也算是一個hack吧



相關文章

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.