font-size在-webkit和-moz浏览器中不同 [英] font-size different in -webkit and -moz browsers
问题描述
请检查此 jsfiddle
当 font-size
设置为 1.5em
时,为什么日期选择器的大小不同?
em的数量不重要我有tryd不同的字体大小,我仍然得到同样的问题。红色框设置为460px,您可以看到firefox和chrome / safari中日期选择器的大小差异。
编辑:我已经尝试了 d使用px insted of em
Firefox使用 DirectWrite 来呈现文本,而Chrome不会。
这是为什么大小稍微不同的原因
没有办法让两个浏览器之间的文字大小相同 b
$ b
阅读: http: //www.basschouten.com/blog1.php/font-rendering-gdi-versus-directwrite
这样,特别提示和间距差异部分: http://blog.mozilla.com/nattokirai/2011/08/11/directwrite-text-rendering-in-firefox-6/
Check this jsfiddle
Why is there a difference in size of the datepicker when font-size
is set to 1.5em
?
The amount of em's is not important I have tryd different font-sizes and I still get the same problem. The red box is set to 460px and is there for you to see the difference in size of the datepicker in firefox and chrome/safari.
Edit: I have already try'd using px insted of em
Firefox uses DirectWrite to render text, and Chrome doesn't.
That is the reason for the ever so slightly different size of the rendered text.
There is no way to make the text pixel-perfect the same size between the two browsers.
Read this: http://www.basschouten.com/blog1.php/font-rendering-gdi-versus-directwrite
And this, particularly the "Hinting and spacing differences" section: http://blog.mozilla.com/nattokirai/2011/08/11/directwrite-text-rendering-in-firefox-6/
这篇关于font-size在-webkit和-moz浏览器中不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!