常用的 css hack執行個體

來源:互聯網
上載者:User

注意順序:

#menu {  line-height: 23px; }/* firefox 瀏覽器實行這句定義 */
#menu { line-height: 26px\9; }/*ie6,ie7,ie8 這句定義主要尖對IE8來hack*/
#menu { *line-height: 23px; }/*ie6,ie7 這句定義主要尖對IE7來hack*/
#menu { _line-height: 23px; }/*ie6 瀏覽器優先實行這句定義*/
或者寫成一句
#menu { line-height:23px; line-height: 26px\9; *line-height: 23px; _line-height:23px; }
或者
* html #menu { line-height: 23px; } /* IE6 瀏覽器實行這句定義 */
*+html #menu { line-height: 23px; }/* IE7 瀏覽器實行這句定義*/

相關文章

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.