Angular Material的mat-select控件,默认背景是灰色的,看着不和谐,想把背景色改了:
网上找到了方法:
https://stackoverflow.com/questions/64431432/angular-10-remove-background-color-on-mat-select
在全局的style.css中添加:
::ng-deep .mat-form-field-appearance-fill .mat-form-field-flex {
background-color: #fff;
}
效果:
问题解决。