I want to change the default appearance of the arrow of a dropdown list so that looks the same across browsers. Is there a way to override the default look and feel of the drop down arrow using CSS or otherwise ?
相关问题
- Adding a timeout to a render function in ReactJS
-
Why does the box-shadow property not apply to a
- Add animation to jQuery function Interval
- jQuery hover to slide?
- Issue with star rating css
The
<select>
element is generated by the application and styling is not part of the CSS/HTML spec.You would have to fake it with your own DIV and overlay it on top of the existing one, or build your own control emulating the same functionality.
You can acheive this with CSS but you are not techinically changing the arrow itself.
In this example I am actually hiding the default arrow and displaying my own arrow instead.
HTML:
CSS:
No, you can't do it by using an actual
<select>
, but there are techniques that allow you to "replace" them with javascript solutions that look better.Here's a good article on the topic: <select> Something New