首页 > 其他 > 详细

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

时间:2020-03-05 11:53:33      阅读:484      评论:0      收藏:0      [点我收藏+]

讨厌的自动填充背景色:

技术分享图片

 

 解决方法:

<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

 

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

原文:https://www.cnblogs.com/digdeep/p/12419283.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!