我正在使用 mat-form-field 和 mat-icon,我想当我在 mat-form-field(mat-Input field)中单击或聚焦时,应该更改 mat-icon 颜色,当 focus out mat -图标保持与以前相同的颜色。 (Stackblitz)see in this example & make changes inside
最佳答案
您可以在代码中添加以下样式,
.mat-focused .mat-icon {
color: red;
}
关于html - 如何在垫输入字段中聚焦时更改垫图标颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55475124/