【问题标题】:Implementing progress bar with custom color in angular 2 and bootstrap 4在angular 2和bootstrap 4中使用自定义颜色实现进度条
【发布时间】:2017-02-04 11:11:56
【问题描述】:

我正在尝试使用 ng-bootstrap 组件实现引导进度条。该文档使用指令“type”提供了 4 种着色类型,该指令只能是 4 种之一:“success”、“info”、“warning”或“danger”。 (https://ng-bootstrap.github.io/#/components/progressbar)

我确保在我的变量 sass 文件夹中自定义了所有颜色,以覆盖引导程序的默认变量。

但在使用主要时,条形显示为蓝色。

进度条码:

<ngb-progressbar type="primary" [value]="25"></ngb-progressbar>

CSS 试验:

//Doesn't work - no effect what so ever - this style is placed in a global stylesheet in order to have access to the progress bar.
.progress.progress-primary{
    background-color: yellow;
}

关于如何更改该颜色的任何建议?

【问题讨论】:

    标签: angular bootstrap-4 ng-bootstrap


    【解决方案1】:

    Bootstrap 4 不会根据预定义的变量更改进度条。 $progress-bar-color 变量是硬编码的,导致了问题。

    现已修复。

    【讨论】:

      猜你喜欢
      • 2018-11-28
      • 2018-07-29
      • 2015-12-26
      • 2017-11-23
      • 1970-01-01
      • 2019-01-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多