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
No description
2 Replies
ἔρως
ἔρως2w ago
the new pseudo-class is :-internal-autofill-selected i dont know if it will work or not
vic
vicOP7d ago
I will try and tell

Did you find this page helpful?