布尔玛卡内容更改颜色

时间:2019-01-11 12:01:33

标签: css bulma

我遇到了一个小问题。 我想更改卡片内容的背景。但是没有任何效果。 我有这段代码:

<div class="card" style="width: 75%!important;">
....
  <div class="card-content">
    <div class="content">
....
    </div>
  </div>
</div>

css

.card .content {
  background: rgba(255, 255, 255, 0.5)!important;
}

2 个答案:

答案 0 :(得分:1)

如果在bulma项目中使用sass,则可以更改变量common/settings.gradle$card-colorhttps://bulma.io/documentation/components/card/

您可以向$card-background-color类添加新样式并设置card属性。

background-color

答案 1 :(得分:1)

或者您可以使用预定义的背景颜色类,例如 has-background-light

https://bulma.io/documentation/helpers/color-helpers/#background-color

<div class="card has-background-light" style="width: 75%!important;">
....
  <div class="card-content">
    <div class="content">
....
    </div>
  </div>
</div>