How to remove the arrow from a select element in Firefox

后端 未结 30 1674
北恋
北恋 2020-11-22 15:58

I\'m trying to style a select element using CSS3. I\'m getting the results I desire in WebKit (Chrome / Safari), but Firefox isn\'t playing nicely (I\'m not ev

30条回答
  •  爱一瞬间的悲伤
    2020-11-22 16:29

    Use the pointer-events property.

    The idea here is to overlay an element over the native drop down arrow (to create our custom one) and then disallow pointer events on it. [see this post]

    Here is a working FIDDLE using this method.

    Also, in this SO answer I discussed this and another method in greater detail.

提交回复
热议问题