如何从下拉列表中删除默认箭头图标(选择元素)? [英] How to remove the default arrow icon from a dropdown list (select element)?
本文介绍了如何从下拉列表中删除默认箭头图标(选择元素)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从 HTML 元素中删除下拉箭头.例如:
I want to remove the dropdown arrow from a HTML <select>
element. For example:
<select style="width:30px;-webkit-appearance: none;">
<option>2000</option>
<option>2001</option>
<option>2002</option>
...
</select>
如何在 Opera、Firefox 和 Internet Explorer 中执行此操作?
How to do it in Opera, Firefox and Internet Explorer?
推荐答案
无需破解或溢出.IE 上的下拉箭头有一个伪元素:
There's no need for hacks or overflow. There's a pseudo-element for the dropdown arrow on IE:
select::-ms-expand {
display: none;
}
这篇关于如何从下拉列表中删除默认箭头图标(选择元素)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文