更改 angular material 输入文本框的高亮颜色
Change the highlighted color of angular material input text box
您好,我正在使用 angular material,我想在点击时更改 material 输入焦点颜色
现在默认显示的是紫色,我喜欢改成白色
我尝试了很多 css。但对我来说没有任何效果
下面是stackblitz的例子URL
https://stackblitz.com/edit/material-input-sample?file=src/app/app.component.ts
您可以使用 ::ng-deep 修改 mat-input 元素的 css。
::ng-deep {
.mat-form-field-label {
color: white !important;
}
.mat-form-field.mat-focused .mat-form-field-ripple {
background-color: white !important;
}
}
您好,我正在使用 angular material,我想在点击时更改 material 输入焦点颜色
现在默认显示的是紫色,我喜欢改成白色
我尝试了很多 css。但对我来说没有任何效果
下面是stackblitz的例子URL
https://stackblitz.com/edit/material-input-sample?file=src/app/app.component.ts
您可以使用 ::ng-deep 修改 mat-input 元素的 css。
::ng-deep {
.mat-form-field-label {
color: white !important;
}
.mat-form-field.mat-focused .mat-form-field-ripple {
background-color: white !important;
}
}