Unfortunately, you can't just change default background color and text color of a selected option by just css. They're maganed by your browser, and some of them don't want to keep your css style.
That's why you always see that default ugly blue background and always white text.
BUT I have a hack here:
For changing the backround color you can use linear-gradient with same color like this:
option:hover,
option:checked,
option:active,
option:focus {
background: linear-gradient(#ffffd4, #ffffd4);
position: relative;
}
For changing text color you can use pseudo-class with content which is equal to your option text, like this:
select:focus > option:checked:before {
color: #101010;
position: absolute;
content: attr(data-content);
}
data-content can be added directly in html or via javascript/jQuery.
<option data-content="One">One</option>
You need position absolute to hide your option text under the pseudo class.
option:hover,
option:checked,
option:active,
option:focus {
background: linear-gradient(#ffffd4, #ffffd4);
position: relative;
}
select:focus > option:checked:before {
color: #A52A2A;
position: absolute;
content: attr(data-content);
}
select {
width: 200px;
}
option {
padding: 5px 10px;
}
option:hover {
cursor: pointer;
}
<select size=5>
<option data-content="One">One</option>
<option data-content="Two">Two</option>
<option data-content="Three">Three</option>
<option data-content="Four">Four</option>
<option data-content="Five">Five</option>
</select>