使用标签的时候,某些浏览器会自动渲染其中的背景以及文字的效果,这个时候需要去除自动渲染出来的效果
<input type="name" value="" class="form-control" placeholder="Name">
.form-control{
// 覆盖浏览器默认input的背景颜色
// 生效的就是下面这句bo-shadow
box-shadow: inset 0 0 0 1000px #f7f7f8 !important;
//下面就是自己写的一些样式
font-size: 14px;
color: #adaebe;
-webkit-box-shadow: none;
box-shadow: none;
height: 55px;
background-color: #f7f7f8;
border: 1px #f7f7f8 solid;
border-radius: 30px;
padding-left: 30px;
-webkit-transition: all 0.4s ease-in-out;
transition: all 0.4s ease-in-out;
}
// 覆盖浏览器默认input的文字颜色
input:-webkit-autofill {
/* 选择历史记录的文字颜色*/
-webkit-text-fill-color: #adaebe;
}