1

I'm using antd input like this enter image description here

How to change the grey color to white color. I tried changing on the input tag:

background-color: white !important;

but it doesn't work

Twitter khuong291
  • 11,328
  • 15
  • 80
  • 116

4 Answers4

4

This is because of autocomplete, which sets a blue background on these elements. You can use a quick hack to fix this, using an inset box-shadow:

input:-webkit-autofill {
    box-shadow: 0 0 0 9999px #fff inset;
}
corn on the cob
  • 2,093
  • 3
  • 18
  • 29
0

Would like to ask if that happened when the input is focused? Can you try this

input[type=password]:focus {
    background-color: white;
}
jrran90
  • 668
  • 12
  • 18
0

This looks like a style when the input is selected.

Try to :focus

Jpv
  • 93
  • 3
  • 17
0

Your screenshot looks like password field was filled by autocomplete. If my guess is right, please head to this link and this link.