Safari change select height

后端 未结 4 1603
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-11 16:37

I can\'t change select height, with all browser working fine, but Safari no, where can be problem? Also I try make class .style select, bu

相关标签:
4条回答
  • 2021-02-11 16:56

    To style a select in Safari, you first have to turn off the os styling:

    -webkit-appearance: none;
    
    0 讨论(0)
  • 2021-02-11 16:57

    You can also use

    line-height: 25px
    

    which doesn't affect other browsers, but fixes this bug in Safari

    0 讨论(0)
  • 2021-02-11 17:03

    The best way use modernizer detector and give safari class select menu a

    line-height: 20px;
    

    or you can use jquery UI select menu to solve this by another cross-browser wy.

    0 讨论(0)
  • 2021-02-11 17:09

    Try adding this:

    -webkit-appearance: menulist-button;
    
    0 讨论(0)
提交回复
热议问题