删除下拉列表中的按钮

删除下拉列表中的按钮

本文介绍了删除下拉列表中的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法隐藏或删除下拉列表中的箭头按钮?

Is there a way to hide or remove the arrow button inside a dropdownlist?

推荐答案

是的,至少在webkit: 。

Yes, at least in webkit: http://jsfiddle.net/zzTjy/1/.

HTML

<select>
    <option>123</option>
</select>

CSS

SELECT { -webkit-appearance: none; }

值得注意的是Mozilla支持 -moz-appearance ,但它不隐藏下拉列表中的箭头。

It's worth noting that Mozilla supports -moz-appearance, but it doesn't hide the arrow in the dropdown list. This has been an open issue for quite some time.

Mozilla还声明:

Mozilla also states:

这可能有点恶劣,但你肯定不应该使用 appearance 来改变元素的预期行为。

This may be a bit draconian, but you certainly shouldn't use appearance to change the expected behavior of the element.

进一步阅读





  • More Examples
  • Bug to Implement in Mozilla
  • How to remove the arrow from a <select> tag in Firefox

这篇关于删除下拉列表中的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 14:05