美文网首页
input的type=password,获取焦点背景变黄色

input的type=password,获取焦点背景变黄色

作者: 新篇章 | 来源:发表于2018-07-13 19:07 被阅读0次

1.input的类型(type="password")的时候,只需要在input中假如autocomplete="new-password"

<input type="password" placeholder="6位纯数字交易密码" class="auth_input" id="changePay_newPassWord" onkeyup="value=value.replace(/[^\d]/g,'')" autocomplete="new-password"/>

2.input类型不是“password”,是“text”或其他时:

body input:-webkit-autofill,
body textarea:-webkit-autofill,
body select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px #232335 inset !important;
    background-color: #232335 !important;
    background-image: none !important;
    -webkit-text-fill-color: #fff;
    -webkit-tap-highlight-color: #fff !important;
}

相关文章

网友评论

      本文标题:input的type=password,获取焦点背景变黄色

      本文链接:https://www.haomeiwen.com/subject/biuspftx.html