本文介绍了如何从Bootstrap中的下拉菜单中删除箭头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试从下拉菜单中删除箭头.我想显示带有2个glyphicons的triangle_span-三角形.怎么做? 我的代码是:
I'm trying to remove arrow from dropdowns. I want to show triangle_span instead with 2 glyphicons - triangles. How to do that? My code is:
<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>
推荐答案
您可以检查此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;
}
这篇关于如何从Bootstrap中的下拉菜单中删除箭头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!