更改箭头选择下拉菜单的颜色

时间:2018-01-24 08:38:02

标签: html css

您好,有人可以帮我,如何在不改变文字颜色的情况下更改此箭头的颜色,我不想添加箭头图像我只需更改此颜色



select.dropdowni{
color: red;
}

<select  class="btn btn-default dropdown-toggle dropdowni" name="{{ $question->id }}[]"> 
 <ul class="dropdown-menu">
<option value="{{ $option->id }}">Test</option>
</ul>
</select>
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:1)

你可以尝试这样的事情。

<!DOCTYPE html>
<html>
<style>
    .select_div{
  overflow: hidden;
  border: 1px solid #000;
  position: relative;
  padding: 10px 0;
}
.select_div:after{
  width: 0; 
  height: 0; 
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #f00;
  position: absolute;
  top: 40%;
  right: 5px;
  content: "";
  z-index: 98;
 }
.select_div select{
  width: 110%;
  border: 0;
  position: relative;
  z-index: 99;
  background: none;
}
</style>
<body>
<div class="select_div">
 <select>
   <option>Test This Select</option>
   <option>Test This Select</option>
 </select>
</div>

</body>
</html>