Why is text in disabled form elements not rendered in black in Safari?

坚强是说给别人听的谎言 提交于 2019-12-01 17:14:19

Try:

-webkit-text-fill-color: #000000;

This worked in Safari 7.

This is odd indeed. It seems that Safari shows the exact color black as gray in a disabled field, whereas other colors are obeyed. As a workaround, you could set color: #000001, but it isn’t quite black of course but has a shade of blue.

As a different approach, consider why a field is set to disabled state, yet should be displayed in normal black color. For example, display it in normal text (and turn it to normal input field when you would now make the disabled field enabled).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!