我正在寻找与 select:focus 相反的东西,它可以在做出选择后从 CSS 中为选择设置样式。
概念:
select:when not focused
{
color:transparent;
}
最佳答案
你可以使用 :not
伪类并将其与 :focus
结合起来。这样的事情应该有效:
select:not(:focus) {
color: red;
}
这是一个演示:http://jsfiddle.net/b2rnU/1
关于html - 在做出选择后使用 CSS 为 HTML 选择设置样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16587641/