style select option using css

后端 未结 4 1517
太阳男子
太阳男子 2020-12-17 06:06

I\'m trying to style a select option list using CSS. I want more padding between the times of the list because the seem squashed together. I\'ve tried adding padding to the

4条回答
  •  渐次进展
    2020-12-17 06:29

    I changed a few things in your code sample there. But it looks to me like the best you're going to get is a colour change of the selected element:

    http://jsfiddle.net/GUdhc/25/

    If you then click on something in the box you'll see the "selected" ones are in a red font. You can't change the padding, margin or others that way.

    You may need to use javascript "OnChange" to do this but that's beyond me.

提交回复
热议问题