浏览器自带记忆功能,使input颜色和字体丢失


方法一 : 会有视觉上颜色的变化
input:-internal-autofill-selected { /*内置阴影填充 背景颜色*/ box-shadow: inset 0 0 0 1000px #253167! important; /*只有谷歌兼容 字体颜色*/ -webkit-text-fill-color: #fff !important; }

上述可以解决,,
方法二 : 
可以禁用 input的记忆功能
<input type="text"  autocomplete="off">,

方法三
自动填充无限 放慢填充的时间,,感知不到颜色的变化
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-transition-delay: 99999s;
-webkit-transition: color 99999s ease-out, background-color 99999s ease-out;
}


 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM