为什么文本在禁用表单元素不呈现在黑色的Safari? [英] Why is text in disabled form elements not rendered in black in Safari?
问题描述
我想让禁用的输入元素中的文字显示在黑色中。这适用于大多数浏览器:
I am trying to get the text inside disabled input elements to show up in black. This works in most browsers:
input[type="text"][disabled],
input[type="text"]:disabled {
color: #000000;
}
然而,在Safari(6.0.2版) 。最让我困惑的是,当我选择浏览器中的文本并在我的控制台上查找元素信息时,它清楚地显示:
In Safari (version 6.0.2), however, the text is slightly brighter. What puzzles me most is that when I select the text in my browser and look up the element information on my console it clearly shows:
rgba(0,0,0)
是黑色,但仍会显示在其他以外的黑色。这是怎么回事?
So in the code it is black but nonetheless it is rendered in something other than black. How is this possible?
这是Safari的错误吗?
Is this a Safari bug?
感谢您的帮助。 / p>
Thanks for any help in this matter.
推荐答案
尝试:
< -text-fill-color:#000000;
-webkit-text-fill-color: #000000;
这在Safari 7中有效。
This worked in Safari 7.
这篇关于为什么文本在禁用表单元素不呈现在黑色的Safari?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!