CSS Hack的一些小心得

來源:互聯網
上載者:User

先貼幾張圖:

接下來是一段可以區分IE6/IE7/IE8/FF&CHROME&OPERA的CSS代碼:

 

代碼

1 .box-model{ width:300px;
2 background-color:#00FF00; /* for 標準瀏覽器 */
3 background-color:#FF0000\9; /* for IE8 */
4 *background-color:#FFFF00; /* for IE7 */
5 _background-color:#0099FF; /* for IE6 */
6  }

看看實際的效果Demo

 

IE條件注釋:http://msdn.microsoft.com/zh-cn/library/ms537512(v=VS.85).aspx

 

相關文章

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.