CSS 选择器 [英] CSS Select Selector

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

问题描述

选择按钮效果很好:

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?

推荐答案

试试这个:

select {
    background:#000;
}

据我所知,没有 <input type="select"/>,只有 <select></select>.

As I know, there is no <input type="select" />, just <select></select>.

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

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