目标IE6和IE7浏览器没有条件注释

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了目标IE6和IE7浏览器没有条件注释相关的知识,希望对你有一定的参考价值。

The code below will change the background-color of divs depending on what browser the user is viewing the web page under. Since * cascades down to IE7 and below, we use _ after that declaration so that IE6 (and below) has a different background color from IE7.
  1. div {
  2. background-color: #999; /* all browsers */
  3. *background-color: #ccc; /* add a * before the property - IE7 and below */
  4. _background-color: #000; /* add a _ before the property - IE6 and below */
  5. }

以上是关于目标IE6和IE7浏览器没有条件注释的主要内容,如果未能解决你的问题,请参考以下文章