select:disabled {
background-color: #BBBBBB;
}
<select disabled>
<option>test</option>
</select>
如果您在Chrome上运行上面的代码,然后使用 colored颜色 Select 器判断SELECT标记的背景 colored颜色 ,您将得到#CFCFCF
而不是#BBBBBB
在标签上做同样的工作与预期的一样,这是Chrome中的错误还是我遗漏了什么?
select:disabled {
background-color: #BBBBBB;
}
<select disabled>
<option>test</option>
</select>
如果您在Chrome上运行上面的代码,然后使用 colored颜色 Select 器判断SELECT标记的背景 colored颜色 ,您将得到#CFCFCF
而不是#BBBBBB
在标签上做同样的工作与预期的一样,这是Chrome中的错误还是我遗漏了什么?
disabled
会更改项目的不透明度.添加opacity: 1;
select:disabled {
background: #BBBBBB;
opacity: 1;
}
<select disabled>
<option>test</option>
</select>