Kevin Powell - CommunityKP-C
Kevin Powell - Community12mo ago
3 replies
vic

autofill input field bg Color change

In html input field when I starts typing and it gives some autocomplete suggestions of previous used values and when I click that , the input box bg Color change

Like in the image I provided , normally the input box bg is Color is transparent

After I select or hover , it changes the bg Color to white

I tried like

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
-webkit-animation: autofill 0s forwards;
animation: autofill 0s forwards;
}

@keyframes autofill {
100% {
background: transparent;
color: inherit;
}
}

@-webkit-keyframes autofill {
100% {
background: transparent;
color: inherit;
}
}

Which is from stackoverflow

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
background-color:transparent !important;
}

I tried this 2 solution but didn't get result
rn_image_picker_lib_temp_e69c23a9-2831-4fcc-b01f-67ed6d5d4209.jpg
Was this page helpful?