I want to display the selected option in the same colour as the option itself.
<select>
<option value="1" style="color:blue">Blue</option>
<option value="2" style="color:red">Red</option>
</select>
The options are displayed correctly in blue and red colours, but once selected, they are black. Is it possible to display it in blue or red, matching the selected option?
PD: I know how to do it in JS, but I'm not sure if it could be done in CSS