How to style the option of an html “select” element?

后端 未结 18 2492
迷失自我
迷失自我 2020-11-21 05:09

Here\'s my HTML:

 tag like so : 

var select = $(document).getElementById('#select-element-id')

var option = select.children('#option-element-id')

option.css('font-weight', 'bold')

option.css('font-size', '24px')

You can also use to add a line-break between the options.

提交回复
热议问题