How to style Disabled Options in a form

后端 未结 8 1653
不思量自难忘°
不思量自难忘° 2020-12-10 10:39

I\'m using a form with a drop-down menu that contains some options disabled, so the users cannot select them. I\'m trying to customize via css these elements but I have some

8条回答
  •  甜味超标
    2020-12-10 11:14

    What you're looking for is this:

    select option:disabled {
        color: #000;
        font-weight: bold;
    }
    

    Here, have a fiddle.

    Attention: according to reports on the comments section, this solution does not work on OS X.

提交回复
热议问题