'change the color of placeholder when you select any value [duplicate]
i am also using pseudo class "option:checked" its not working ,when we select any value its color changes gray to black its ok but when you defocus the select field this color should black and initially placeholder should be gray.
<select>
<option value="" hidden selected>Choose any...</option>
<option>developer</option>
<option>tester</option>
</select>
css also attached
select {
color: gray;
}
option{
color:black;
}
select:focus{
color: black;
}
this developer color should be black color after selection of option
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
