When you add in the type of an input the value password and email the browser changes the background of this input to yellow and fills in the user data automatically. There is a way to prevent this event:
When you add in the type of an input the value password and email the browser changes the background of this input to yellow and fills in the user data automatically. There is a way to prevent this event:
This yellow color as far as I know the Chrome default and you can remove it like this:
input:-webkit-autofill {
-webkit-box-shadow:0 0 0 1000px #fff inset; /* muda o background color */
-webkit-text-fill-color: #333; /* muda a cor do texto*/
}
input {
background-color: #fff;
color: #333;
}
On the autocomplete you can take the whole form
<form autocomplete="off">
...
</form>
Or direct input
<input type="email" autocomplete="off">
About <input type="password">
in it autocomplete="off"
will not work for Password because of the browser's own browser issue. They make other replies about it. One way to solve this is to have 2 password fields. The first one you put display:none
. The browser in some cases only fills the first password field, so the second one that will be visible and will be empty ...
OBS: You can also do a two-step validation like Google. First you request the e-mail and validate it, then in the next step you ask for the password. Thus the password field is not immediately visible to the user, and only appears after validating the email.