style with CSS select arrow

This question already has an answer here:

  • How to style a <select> dropdown with CSS only without JavaScript? 24 answers

  • you just need to specify position of the background using percentages as follows

    css:

    background: url(https://dl.dropboxusercontent.com/u/59666091/v.png) no-repeat 99% 50% #eeeeee;
    

    What this means is the backround position is at 99% of the box's width (so it doesn't stick to the edge) and 50% of it's height (so it's always centered vertically)

    Here is a JSfiddle demo : http://jsfiddle.net/3sebzwxu/1/

    Hope this helps

    链接地址: http://www.djcxy.com/p/41606.html

    上一篇: 在div中CSS自定义滚动条

    下一篇: 样式与CSS选择箭头