开发者

Apply text color on disabled=true textbox

开发者 https://www.devze.com 2023-01-23 07:00 出处:网络
I would like to know if it\'s possible to force a CSS Color on a \"disabled=true\" textbox? By default, this attribute开发者_JAVA百科 is removing the css font color and replacing it by a very light gr

I would like to know if it's possible to force a CSS Color on a "disabled=true" textbox? By default, this attribute开发者_JAVA百科 is removing the css font color and replacing it by a very light gray.

Thanks


input[disabled='disabled'] {
  color:blue;
  }

source


I found the problem with just using input[disabled='disabled'] was that it also includes checkboxes and radio buttons which I didn't want to handle quite the same way. I found the following method worked for me...

INPUT[type=text][Disabled],
INPUT[type=search][Disabled],
INPUT[type=password][Disabled],
SELECT[Disabled] { color:blue;}
0

精彩评论

暂无评论...
验证码 换一张
取 消