【问题标题】:Override css of bower package覆盖 bower 包的 css
【发布时间】:2014-09-04 05:15:08
【问题描述】:

您好,我正在使用一些 Bower 包,但有一些 CSS 规则定义如下:

.rn-carousel-indicator {
  width: 100%;
  text-align: center;
  height: 20px;
  background-color: black;

我想将它覆盖到我的 common.css 中以删除背景颜色,我可以成功地将其设置为红色,但它不能应用无:

.rn-carousel-indicator {
    background-color: none;
}

无论如何我可以做到这一点?非常感谢!

【问题讨论】:

  • 我认为none 不是background-color 的有效值。如果您想要,请尝试使用transparent

标签: angularjs css mean-stack


【解决方案1】:

background-color:

background-color CSS 属性设置元素的背景颜色,通过颜色值或关键字透明。

所以none无效,你应该使用:

background-color: transparent;

【讨论】:

    【解决方案2】:

    你有几个选择

    background: none;
    

    background-color: initial;
    

    注意,initial 有一些狡猾的browser support。 (显然不支持 IE)

    【讨论】:

    • ...它们可能都不如 Clive 建议的 background-color: transparent
    【解决方案3】:

    background-color: none 无效。你必须使用背景色透明属性。

    例如:

    background-color: transparent;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-15
      • 2020-03-21
      • 1970-01-01
      • 2023-03-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多