h5登录input框浏览器输入账号密码样式设置

当使用浏览器记住的账号和密码登录时,输入框会默认变成白色背景和黑色字体,有时并不符合自己设计的界面的样式,比如暗黑模式,所以需要自己手动设置css。代码如下

input:-webkit-autofill , textarea:-webkit-autofill, select:-webkit-autofill{
    -webkit-text-fill-color: #ccc !important;
    -webkit-box-shadow: 0 0 0px 1000px transparent  inset !important;
    background-color:transparent;
    background-image: none;
    transition: background-color 50000s ease-in-out 0s;
}

输入框默认样式(记录一下,与本文内容无关)

.login-input{
    width:75%;
    height:40px;
    border:1px solid #5081fb;
    border-radius: 5px;
    padding:0 12px;
    background-color:transparent;
    color:#ccc;
    font-size:16px;
    outline:none;
    -webkit-transition: 0.5s;
    transition: 0.5s;
}
.login-input:focus{
    border:2px solid #3E73FB;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值