在mat-form-field中更改边框颜色 [英] Changing border color in mat-form-field
本文介绍了在mat-form-field中更改边框颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用角形材料mat-form-field
.我的背景很暗,因此尝试将表单字段的边框更改为白色.但是我无法使用CSS实现它.不,无论我在CSS中做了什么更改,它们都没有反映回mat-form-field
中.这是我的代码的链接:
I am using angular material mat-form-field
. I have a dark background, and therefore am trying to change the border of the form-field to white. But I am not able to achieve it using css. No, matter what changes I do in the css, they are not reflecting back into the mat-form-field
. Here is the link to my code:
任何帮助将不胜感激. 谢谢.
Any help would be highly appreciated. Thanks.
推荐答案
将此CSS添加到您的 form-field-appearance-example.css
Add this CSS to your form-field-appearance-example.css:
/* Border */
.mat-form-field-appearance-outline .mat-form-field-outline {
color: white;
}
/* Font color */
input.mat-input-element {
color: white;
}
尽管如此,但在重点关注领域时仍然存在问题.
Though, there is still a problem while the field is focused.
这篇关于在mat-form-field中更改边框颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文