input 在 chrome 下 , 自动填充后,默认样式清除


讨厌的自动填充背景色:

 

 解决方法:

<style type="text/css">
input:-internal-autofill-selected {
    background-color: white !important;
    background-image: none !important;
    color: rgb(0, 0, 0) !important;
    box-shadow: inset 0 0 0 1000px white !important;
}
input:-webkit-autofill {
 box-shadow: 0 0 0px 1000px white inset !important;
}  
input:-webkit-autofill:focus {
 box-shadow: 0 0 0px 1000px white inset !important;
}  
</style>   

效果:

 

 

参考:https://blog.csdn.net/xiao_yu_liu/article/details/100582478

https://www.cnblogs.com/chenfanga/p/11600251.html

 


免责声明!

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



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