一條可以區分常用主流瀏覽器的css hack

來源:互聯網
上載者:User

.test{<br /> color:#00C; /* For IE5.5 */<br /> voice-family:"/"}/"";<br /> voice-family:inherit;<br /> color:#000; /* For FF,OP */<br /> [color:#000;color:#0F0; /* For SF,CH */<br /> *color:#FF0; /* For IE7 */<br /> _color:#F00; /* For IE6 */<br />}

 

 

通過以上的樣式,你可以在IE5.5裡看到藍色的字,IE6裡看到紅色的字,IE7看到的是黃色的字,Firefox/Opera看到的是黑色的字,Safari/Chrome看到的是綠色的字。這裡沒繼續將Firefox和Opera,Safari和Chrome區分。

相關文章

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.