【问题标题】:What does an asterisk before the CSS background-color mean? [duplicate]CSS background-color 前面的星号是什么意思? [复制]
【发布时间】:2016-02-12 12:26:53
【问题描述】:

我看到了这段代码。有人能告诉我背景颜色之前的 * 是什么意思吗?它在现代浏览器中是否重要?请注意,这是 Bootstrap 2.3 中使用的 CSS。另外,当与渐变一起使用时,背景重复的目的是什么?需要这个吗?

   background-color: #5bb75b;
   *background-color: #51a351;
   background-image: linear-gradient(to bottom, #62c462, #51a351);
   background-repeat: repeat-x;

【问题讨论】:

    标签: css html twitter-bootstrap


    【解决方案1】:

    *背景问题:

    .classABC {
    background: #000; /* modern browsers */
    *background: #333; /* IE 7 and below */
     _background: #FFF; /* IE6 exclusively */
    }
    

    它用于旧的 IE 版本。

    背景重复问题:

    这里没有什么特别的用途。 如您所知,它沿 x 轴重复图像。也许有图片应用于需要的元素/子元素。

    【讨论】:

      猜你喜欢
      • 2015-05-23
      • 1970-01-01
      • 1970-01-01
      • 2011-05-09
      • 2016-12-15
      • 1970-01-01
      • 2010-09-28
      • 2018-11-21
      • 1970-01-01
      相关资源
      最近更新 更多