No idea what you mean about "the color that highlights <li>
", but it sounds like you want to change the background colour of <option>
elements. I tried it and it doesn't work, you always get the system color.
If you wanted to highlight the entire <select>
element on mouseover, this kinda works:
select:hover { background-color: red; }
However the behaviour is different in different browsers. For example, Chrome doesn't highlight the options in the drop down; Firefox does, but then it doesn't change them back if you move the mouse away and they are still pulled down.
As has been stated on many, many similar questions, you can't reliably style form controls. See here for more details.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…