如何从Bootstrap中的下拉列表中删除箭头

时间:2015-06-23 09:54:50

标签: twitter-bootstrap select

我正在尝试从下拉菜单中删除箭头。我想显示triangle_span而不是2个glyphicons - 三角形。怎么做?  我的代码是:

  <div class="form-group">
<label>Labeling:</label>
                                   
                                    
<input type="hidden" id="unique_index" value="0" />
<select name="labeling[]" id="labeling" class="dropdown" >
<option value=''" . set_select('labeling', '') . " role='menuitem'> </option>
<option value="1" <?php echo set_select('labeling', '1'); ?> role="menuitem">1</option>
<option value="2" <?php echo set_select('labeling', '2'); ?> role="menuitem">2</option>
</select>
 <span  id="triangle_span" >  
<span class="glyphicon glyphicon-triangle-bottom"></span>
<span class="glyphicon glyphicon-triangle-top"></span>
</span>
                             
 </div>

1 个答案:

答案 0 :(得分:1)

您可以查看此css:

select {
   appearance: none;
   -webkit-appearance: none;
   -moz-appearance: none;
   text-indent: 1px;
   text-overflow: '';
   background: url("custom image") no-repeat right center;
}

select::-ms-expand {
    display: none;
}