小编Nan*_*ncy的帖子

角垫选择文本颜色不会改变

我在我的 Angular 应用程序中使用 mat-select。我想更改文本颜色,但颜色没有改变。

<mat-select style="color: red" [(ngModel)]="someValue">
  <mat-option>class="empty-select"</mat-option>
  <mat-option class="not-empty-select" *ngFor="let unit of units [value]="unit">{{unit}}</mat-option>
</mat-select>
Run Code Online (Sandbox Code Playgroud)

我可以毫无问题地更改背景颜色,但文本颜色不会改变。

css material-design angular

13
推荐指数
3
解决办法
3万
查看次数

标签 统计

angular ×1

css ×1

material-design ×1