我在HTML中有一个背景,它看起来像图片中的附件。 的CSS代码:将下拉文本的颜色更改为黑色
.custom-dropdown{
-webkit-appearance: none;
margin-left:190px;
-moz-appearance: none; border: 0 !important;
-webkit-border-radius: 5px; border-radius: 5px; font-size: 14px;
padding: 10px; width: 35%; cursor: pointer;
background-size: 40px 37px;
display:none;
/*
color: #fff;
background: #0d98e8 url('http://www.kevinfremon.com/wp-content/uploads/2013/11/drop-down-arrow.png') no-repeat right center;
*/
background: #e2e2e2 url('http://www.kevinfremon.com/wp-content/uploads/2013/11/drop-down-arrow.png') no-repeat right center ;
color: #fff;
}
的HTML是:
<select id= "dropdownlist" class="custom-dropdown">
<option>Custom Key</option>
<option>test</option>
</select>
现在我想使文本这些下拉列表中出现inblack的(“自定义键”)(不改变背景颜色因为它与我的模板一起)。 我该如何做到这一点?在.custom-dropdown
类
'color:#000000'? – Pete
http://stackoverflow.com/search?q=%5BCSS%5D+style+select – HerrSerker