当我没有填写任何内容时,图标会像电子邮件行一样呈黑色,否则会像密码行一样变绿。我相信它的默认设置,显然这不是一个好的颜色组合。我想改变它,但作为一个菜鸟,我不知道我应该改变哪个属性......
我使用的所有CSS都来自http://materializecss.com/
以下是此表单的代码:
<div class="container">
<div class="row">
<form class="col s8 offset-s2" role="form" method="POST" action="{{ url('/login') }}">
{!! csrf_field() !!}
<div class="row">
<div class="input-field col s12">
<i class="material-icons prefix">account_circle</i>
<input value="Hi" type="email" class="validate" name="email" value="{{ old('email') }}">
<label for="email">Email</label>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<i class="material-icons prefix">dialpad</i>
<label class="active" for="password">Password</label>
<input value=" " type="password" class="validate" name="password">
</div>
</div>
<div class="row">
<div class="checkbox col s3">
<p>
<input type="checkbox" name="remember" id="checkbox_remember"/>
<label for="checkbox_remember">Remember Me</label>
</p>
</div>
<div class="col s4">
<button type="submit" class="waves-effect waves-light btn">
<i class="material-icons left">cloud</i>Login</a>
</button>
</div>
<div class="col s5">
<a class="waves-effect waves-light btn right" href="{{ url('/password/reset') }}">Forgot Your Password?</a>
</div>
</div>
</form>
</div>
</div>
答案 0 :(得分:0)
只需修改css:
.material-icons {
color: your color of choice;
}
表示默认值,并且:
.material-icons.active {
color: your color of choice;
}
选择(聚焦)输入时。
答案 1 :(得分:0)
需要使用正确的伪元素格式(冒号)并添加焦点和悬停以获得良好的衡量标准。 .material-icons:active,.material-icons:focus,.material-icons:hover { 颜色:你选择的颜色; }