CSS selector for expanded select (dropdown) element -
how can style drop down different when open or closed? there pseudo selectors or tricks that? of course out javascript.
<select> <option> op1 </option> <option> op2 </option> </select>
and :hover doesn't suit need because when drop down expanded, can move cursor away. still open :hover styling doesn't apply anymore.
are looking :hover
?
it's state of element if mouse on it.
a { color: blue; } a:hover { color: red; text-decoration: overline; }
<a href="#">move mouse on me</a>
Comments
Post a Comment