CSS input[type=select] 对我不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8838336/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 02:39:02  来源:igfitidea点击:

input[type=select] doesn't work for me

csscss-selectors

提问by Bronzato

Possible Duplicate:
CSS Select Selector

可能的重复:
CSS 选择选择器

I'm trying to add space on the left of my dropdownlist without success.

我正在尝试在下拉列表左侧添加空间但没有成功

Here is what I tried:

这是我尝试过的:

.editor-field input[type=select]
{
    margin-left: 250px;
}

Any idea?

任何的想法?

回答by BoltClock

There is no input[type=select]. You probably meant select, as in

没有input[type=select]。你可能的意思是select,如

.editor-field select
{
    margin-left: 250px;
}

回答by Ry-

A <select>box isn't an <input type="select" />. It's a <select>;

一个<select>箱子是不是<input type="select" />。这是一个<select>;

.editor-field select {
    margin-left: 250px;
}

should work.

应该管用。

回答by thirtydot

Your "dropdown list" is surely a <select>element, not an <input type="select" />, which doesn't exist.

您的“下拉列表”肯定是一个<select>元素,而<input type="select" />不是不存在的 。

Try using .editor-field selectinstead.

尝试使用.editor-field select