去除 CHROME 上focus密码框后的 INPUT 框的屎黄色背景、填充默认样式

1、去除默认蓝色背景:

  input:-webkit-autofill {

     transition: background-color 5000s ease-in-out 0s;

 }

2、去除填充样式

<li><input id="userName" type="text" placeholder="邮箱" onfocus="this.placeholder=''" onblur="this.placeholder='邮箱'" autocomplete="off"/></li>
<li style="display: none"><input type="password" /></li>
<li><input id="password" type="text" placeholder="密码" onfocus="this.placeholder='';this.type='password'" onblur="this.placeholder='密码'" autocomplete="off"/></li>

备注:在登录名和密码框中间插入一个隐藏的密码框,再其他标签上写上“onfocus="this.placeholder='';this.type='password'" onblur="this.placeholder='密码  autocomplete="off" '"”

 

posted on 2018-07-18 16:09  RMlian  阅读(355)  评论(0)    收藏  举报

导航