html标签:input输入框取消默认背景色、记住密码
2017-09-28
1、css处理浏览器输入框记住账号密码后的背景色
input:-webkit-autofill , textarea:-webkit-autofill, select:-webkit-autofill {
-webkit-text-fill-color: #ededed !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;
//背景色透明 生效时长 过渡效果 启用时延迟的时间
}
input {
background-color:transparent;
}
2、html处理浏览器记住密码输入框的问题
//方案一: <!-- 额外增加的内容 --> <form style="display:none"> <input type="password"/> </form> <input type="password" style="width:0;height:0;float:left;visibility:hidden"/> <!-- 原先的input --> <input type="password" name="loginPwd" /> //方案二: <!-- input框中设置autocomplete="new-password" --> <input type="password" name="loginPwd" autocomplete="new-password" />