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