How to change font-color for disabled input?

后端 未结 10 1107
逝去的感伤
逝去的感伤 2020-12-02 12:48

I need to change the style for a disabled input element in CSS.



        
10条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-02 13:43

    This works for making disabled select options act as headers. It doesnt remove the default text shadow of the :disabled option but it does remove the hover effect. In IE you wont get the font color but at least the text-shadow is gone. Here is the html and css:

    select option.disabled:disabled{color: #5C3333;background-color: #fff;font-weight: bold;}
    select option.disabled:hover{color:  #5C3333 !important;background-color: #fff;}
    select option:hover{color: #fde8c4;background-color: #5C3333;}

提交回复
热议问题