CSS选择选择器 [英] CSS Select Selector

查看:142
本文介绍了CSS选择选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

选择按钮的效果很好:

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

但我似乎没有任何工作下拉框,这不工作:

 输入[type =select] 
{
background: 000;
}

我选择正确吗?



<$ p

$ p> select {
background:#000;
}

我知道,没有< input type =select/> ,只需< select>< / select>


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>.

这篇关于CSS选择选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆