Basically I wanted to change the color of input fields when using browsers autofill or saved emails (dropdown of previously used emails in the same input box). For that I was using these css properties.
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
-webkit-box-shadow: none !important;
-webkit-text-fill-color: black !important;
}
<div class="row">
<div class="col-md-12">
<label for="email">Email:</label>
</div>
<div class="col-md-12">
<input type="email" class="form-control" id="email" placeholder="Enter your email">
</div>
</div>
But the issue was still there when i was selecting any autofilled/saved email from the dropdown it changes the input field background to blueish whereas I wanted to keep it white/transparent.
2
Answers
Issue resolved after using this css property
Issue Screenshot
See when the issue was resolved using this css property
You can customize both the input box and the text inside it.
You can choose colors like
white
,#DDD
, orrgba(102, 163, 177, 0.45)
.But,
transparent
won’t work here