<分区>
<分区>
如何更改 <select>
中的箭头样式.更改背景、字体颜色或所有边框内容很简单,但如何更改其中的“箭头”?当我改变字体颜色内容颜色改变但箭头保持黑色。
.language-choice{
margin-top: 10px;
color: #719dd1;
border-color: #719dd1;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border-width: 2px;
}
<select class="language-choice">
<option value="en">English</option>
<option value="pl">Polish</option>
</select>
最佳答案
你可以试试这个:
.language-choice{
width: 268px;
padding: 5px;
font-size: 16px;
line-height: 1;
border: 0;
border-color: #719dd1;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border-width: 2px;
height: 34px;
background: url(http://cdn1.iconfinder.com/data/icons/cc_mono_icon_set/blacks/16x16/br_down.png) no-repeat right #ddd;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-position-x: 244px;
}
关于html - 如何设置选择元素的箭头样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32883817/