<select class="form-control" id="widgets">
<option class="text-muted" style="color: grey;">Choose an option</option>
</select>
我的选择中有一个选项,我想将文本的颜色更改为灰色。我试过 Bootstrap text_muted 或 css color:grey。既不工作。我究竟做错了什么?
最佳答案
对我来说看起来不错,也许你没有注意到它,因为单个选项上的突出显示看到这个变化:
<select class="form-control" id="widgets">
<option class="text-muted" style="color: white;">Choose an option</option>
<option class="text-muted" style="color: grey;">Choose an option</option>
</select>
关于html - 选择中第一个选项的颜色不会改变。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47445527/