【问题标题】:How to change selected text and checkbox blue color to gray in ng-multiselect-dropdown Angular 7如何在ng-multiselect-dropdown Angular 7中将选定的文本和复选框蓝色更改为灰色
【发布时间】:2020-06-24 07:04:24
【问题描述】:

我正在处理 ng-multi-select 下拉菜单(在 angular7 中),我可以在外部更改宽度大小。但是,我无法更改所选文本的颜色,也无法更改复选框颜色。简而言之,我需要将蓝色更改为灰色。我尝试了不同的解决方案,但没有成功。谁能从我的代码下面看到我做错了什么?

【问题讨论】:

标签: css angular multi-select


【解决方案1】:

对于 Angular v8,添加这个 CSS 样式应该可以解决问题:

.mat-primary .mat-option.mat-selected:not(.mat-option-disabled) {
     color: #17c017 !important;
}

.mat-primary .mat-pseudo-checkbox-checked, 
.mat-primary .mat-pseudo-checkbox-indeterminate {
     background: #17c017 !important;
}

【讨论】:

    猜你喜欢
    • 2013-12-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-12
    • 1970-01-01
    相关资源
    最近更新 更多