Style autocomplete background

Asked

Viewed 548 times

0

The bottom of input is transparent, but when the browser automatically completes, it gets this color shown in the second image, is there any way to leave completed, but that remains transparent? I’ve tried many ways, but none of them work.

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

  • The closest I could get was therein. When completed, the fund becomes transparent.

  • It worked, thanks!

  • I don’t answer because it was in trial and error based on various websites. I don’t have mastery over what I did. If it makes sense and someone knows what’s going on in the code, feel free to post as an answer.

1 answer

1

I ran some tests on the name transparent and if you assign this value it will always stay with this default color of the browser. The most recommended is you put the background color, in your case I believe that black.

input:-webkit-autofill {
    -webkit-box-shadow:0 0 0 50px black inset; /* aqui muda sua cor do fundo */
    -webkit-text-fill-color: #ccc; /* Cor do texto */
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.