【发布时间】:2019-08-26 16:47:46
【问题描述】:
我正在尝试在其mat-focussed 之后更改我的选择框的占位符颜色和背景颜色,但颜色或背景没有改变。它被固定为相同的蓝色原色。
<mat-form-field floatLabel="never">
<mat-select placeholder="Select Function">
<mat-option *ngFor="let option of functionOptions" [value]="option.name">
{{option.name}}
</mat-option>
</mat-select>
</mat-form-field>
scss
::ng-deep .mat-form-field.mat-focused .mat-form-field-label {
color: #4dff91!important;
background-color : grey;
}
我什至尝试将占位符更改为 mat-label 并为 mat-label 提供 css,但仍然没有运气
【问题讨论】: