I'm trying to change the background color and the font color of the option inside the form select element. I've used Boostrap 5.
I would like when I have clicked shows the options with a custom background color and font color:
The html code:
select option {
background-color: yellow !important;
color: red !important;
}
<div>
<select class="form-select" aria-label="Default select example">
<option selected id="Subject">Subject</option>
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
</div>
Here the official documentation.
Maybe someone can help me.
Thanks.
