class pseudo-class :checked initially applied to elements that have HTML4 selected and checked attributes
Source: w3.org
So this CSS works, although the color style is not possible in every browser:
option:checked { color: red; }
An example of this is in action, hiding the currently selected item from the drop-down list.
option:checked { display:none; }
<select> <option>A</option> <option>B</option> <option>C</option> </select>
To change the currently selected parameter in the closed drop-down menu, you can try changing the logic:
select { color: red; } option:not(:checked) { color: black; }
Emmett Dec 23 '11 at 18:37 2011-12-23 18:37
source share