Answers for "css if select has value"

CSS
0

css if select has value

//if select has this value
select > option[value="someValue"] {background: #ccc;}

//if select has this value selected
select > option[value="someValue"]:checked {background: #ccc;}
Posted by: Guest on August-02-2021

Browse Popular Code Answers by Language