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

前端 未结 6 1357
青春惊慌失措
青春惊慌失措 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 10:51

    The CSS styling of the text inside the option tags cannot be changed in Firefox.

    In Firefox: Only the "selected" element in the drop down combo box respects any CSS styling you apply. The style does not cascade down to the option tags. Adding CSS style to each option tag has no effect.

    In Chrome: Chrome respects the CSS styling you add to the select and option tags. The style does not cascade down from the select tag to the option tags, but you can apply style to each option tag.

    I've read that "the standard" does not require the select and option tags to be stylable.

提交回复
热议问题