讨厌的自动填充背景色:

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>   

效果:

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

 

 

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

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2021-09-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-19
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2021-12-19
  • 2021-12-10
  • 2022-12-23
相关资源
相似解决方案