更改materialize.css输入字段的默认颜色.我已附上截图 [英] Change the default color of materialize.css input fields. I have attached screenshot
本文介绍了更改materialize.css输入字段的默认颜色.我已附上截图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试添加自定义CSS,但是没有用.选择输入字段后,我需要更改文本的颜色.
I have tried to add custom css, but not worked. I need to change the color of text after selecting the input fields.
<div class="input-field form-group">
<input id="first_name" class="active validate form-control" name="first_name" type="text" value="">
<label for="first_name" class="mat-label">First Name</label>
</div>
推荐答案
一种简单的方法,尽管您应该编辑SCSS文件. 但是,如果您想快速使用,请使用以下CSS. 我在这里使用了宝蓝色,您可以使用任何十六进制颜色.
An easier way, though you should edit the SCSS files. But if you want in quick then use the following css. I have used royalblue color here, you can use any hex color.
对于底部边框
input:focus {
border-bottom: 1px solid royalblue !important;
box-shadow: 0 1px 0 0 royalblue !important;
}
对于标签颜色
label.active {
color: royalblue !important;
}
这篇关于更改materialize.css输入字段的默认颜色.我已附上截图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文