discrepancy between Chrome and Firefox

I have a disabled input element that I am styling using the following CSS:

input[disabled='disabled'] {
    color: #666;
}

This CSS works as expected in Firefox, but Chrome renders the text color several shades too light. If I set the color all the way to black #000000 Chrome renders it as a dark grey instead of black. The problem here is that the CSS produces the expected result in Firefox, but not in Chrome.

An example in JSFiddle which will showcase the discrepancy: http://jsfiddle.net/2AtGX/

How can I get this disabled input element to look the same in Firefox and Chrome?


Please check this link for the answer:

How can I fully override Chromium disabled input field colours?

Short answer: set -webkit-text-fill-color: black

链接地址: http://www.djcxy.com/p/49646.html

上一篇: jQuery UI的工具提示显示在选择选项上

下一篇: Chrome和Firefox之间的差异