简体   繁体   English

CSS Select 选择器

[英]CSS Select Selector

Selecting for buttons works fine:选择按钮工作正常:

input[type="submit"]
{
    background:#efefef;
    width:auto;
    padding:5px;
    color:#666;
    font-size:16px;
    font-weight:bold;
    padding:5px 15px;
}

But I can't seem to get anything to work for drop down boxes, this doesn't work:但我似乎无法为下拉框找到任何工作,这不起作用:

input[type="select"]
{
    background:#000;
}

Am I selecting it correctly?我选对了吗? Can you do it this way?你可以这样做吗?

Try this:尝试这个:

select {
    background:#000;
}

As I know, there is no <input type="select" /> , just <select></select> .据我所知,没有<input type="select" /> ,只有<select></select>

select NOT input[type=select] - browser offer differing capabilities on styling the select element so be patient select NOT input[type=select] - 浏览器对 select 元素的样式提供不同的功能,所以请耐心等待

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM