我正在使用Firefox 25。但它也发生在IE7/8中
这是 HTML:
<div class="elemento">
<div class="form">
<label for="formulario"> <span>Formulario:</span> </label>
</div>
<select id="formulario" name="formulario" class="select">
<option value="Contratos - Literario">Contratos - Literario</option><option value="Inscripcion de obra publicada">Inscripcion de obra publicada</option>
</select>
</div>
</div>
我应用了这个CSS,Firebug说:
div.box .select {
background: none repeat scroll 0 0 #333333;
border-color: #171717;
border-style: double;
border-width: 1px;
color: #FFFFFF;
padding: 3px;
width: 180px;
}
.acciones_botonera input, select {
background-color: #BBBBBB;
border: medium none;
color: #114477;
height: 100%;
margin: 0;
padding: 0;
}
为什么特别应用第二个 CSS? .acciones_botonera input, select
我不是说只将其应用于应用了类.acciones_botonera
的元素内部的select
元素吗?
.acciones_botonera input, select {
}
将大括号之间的所有内容应用于具有类".acciones_botonera"的元素内的所有输入以及 DOM 中的所有选择。
如果你真的想实现你所描述的情况,它应该看起来像这样:
.acciones_botonera input, .acciones_botonera select {
}