How to change font-color for disabled input?

2019-01-10 18:30发布

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

<input type="text" class="details-dialog" disabled="disabled" />

How I can do this for Internet Explorer?

9条回答
趁早两清
2楼-- · 2019-01-10 19:19
input[disabled], input[disabled]:hover { background-color:#444; }
查看更多
迷人小祖宗
3楼-- · 2019-01-10 19:21

Replace disabled with readonly="readonly". I think it is the same function.

<input type="text" class="details-dialog" readonly="readonly" style="color: ur color;">
查看更多
三岁会撩人
4楼-- · 2019-01-10 19:26

You can:

input[type="text"][disabled] {
   color: red;
}
查看更多
登录 后发表回答