我正在使用有角度的材料,我需要单独更改文本框的主要颜色。 有没有办法只对文本框进行更改
<mat-form-field class="example-full-width">
<mat-label>Favorite food</mat-label>
<input matInput placeholder="Ex. Pizza" value="Sushi">
</mat-form-field>
我想更改下划线颜色。
答案 0 :(得分:0)
尝试在输入字段中添加一个类。
<mat-form-field class="example-full-width">
<mat-label>Favorite food</mat-label>
<input class="fav-food-input" matInput placeholder="Ex. Pizza" value="Sushi">
</mat-form-field>
在你的 css 文件中
.fav-food-input{
color: red !important; //Whichever color you need
}