CSS, overwrite height of all select dropdowns?

后端 未结 7 844
夕颜
夕颜 2021-01-05 16:44

how would i reference, so i could overwrite, all of the select boxes so i can overwrite the default height? I\'m familiar when i create elements using a class, but im unsure

7条回答
  •  囚心锁ツ
    2021-01-05 17:16

    You mean the menu that pops up when dropping down a native select element?

    I don't think you can influence that at all, that's entirely up to the browser.

    What you might be able to influence - it should work in all current browsers - is the select itself:

    select { height: .... }
    

    or each option (Should work in Firefox; spotty support otherwise)

    select option { height: .... }
    

提交回复
热议问题