Chrome renders em based font sizes differently on devices

左心房为你撑大大i 提交于 2019-12-24 01:55:10

问题


I'm having an issue comparing font sizes between pages on my layout. I have the font set on the body with font-size: 100%; and on my paragraph tags with font-size: 1em;.

I have a two column page set with CSS columns and a single column layout. The font is rendering larger on the single column page. It's also rendering differently with font-size: .75em; in the footer and on a main section of my site.

I've determined that it's Chrome only and appearing to cause the issue on the Nexus 7. The issue is a non issue on Chrome in an iPad 3.

Does anyone have any experience with this?


回答1:


These are 2 different OS, this is usually regular to have these irregularities between devices. EM is based on the default font-size, if haven't declared one, the os depending on the screen resolution will declare one. font-size:100% won't do anything, you should declare a constant font-size i.e font-size:12px in the body.

Then you should have consistency or close to it.



来源:https://stackoverflow.com/questions/14160931/chrome-renders-em-based-font-sizes-differently-on-devices

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