去掉有Cookie时文本框的黄色背景

在做项目的时候,回过头来,发现这货居然变得这么丑了。简直不能忍。因为我从未写过这些样式。所以我初步判断这是由于Cookie引起的。于是我去翻看它的样式,如下:

input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill{
    background-color: rgb(250, 255, 189);
    background-image: none;
    color: rgb(0, 0, 0);
}

有木有!有木有哇,泥煤的,居然自动生成了这些样式。于是,我就百度上找答案。经过可靠的实验。如下代码可以解决这个问题:

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0px 1000px white inset;
}





相关文章:

  • 2022-01-16
  • 2022-12-23
  • 2021-05-12
  • 2021-05-07
  • 2021-12-19
  • 2022-01-11
  • 2021-05-03
  • 2021-05-26
猜你喜欢
  • 2021-07-09
  • 2021-05-10
  • 2022-12-23
  • 2021-12-04
  • 2021-12-31
  • 2021-05-24
  • 2021-07-25
相关资源
相似解决方案