How to change the font size of the list (not the initial view)

前端 未结 6 1375
青春惊慌失措
青春惊慌失措 2020-12-19 10:39

I have set a custom font and background for the initial view of the dropdown list (Select a choice). The font-size is 20 pixels and looks great with the custom

6条回答
  •  没有蜡笔的小新
    2020-12-19 11:06

    I am agreed with Peter but by the use of:

    select {
      font-size: 20px;
      font-family: 'Averia Libre', cursive;
    }
    

    on the css will change all of the dropdown font so he should use class instead of total select

    CSS

    .selectClass {
       font-size: 25px;
       font-family: 'Impact', cursive;
    }​
    

    And HTML

    
    
    

    Or you may see the fiddle directly on http://jsfiddle.net/sNkDW/

提交回复
热议问题