Why some font-sizes rendered larger in mobile browsers?

99封情书 提交于 2019-12-08 05:13:58

问题


My website's homepage have some h and div elements. The first h2 tag's and div tag's font sizes are with px. I have "-webkit-text-size-adjust: none;" spesification in html and body tags also. However the first tags's font size's rendered bigger in mobile browsers. Why? How can I solve this problem?

css codes:

h2 {
font-size: 16px;
}
#main h2 {
font-size: 16px;
font-weight: normal;
margin: 0;
}

.introdiv {
font-size: 12px;
line-height: 1.3;
margin: 0;
padding: 0 10px 24px 3px;
}

回答1:


Try adding this into the head tag of your HTML.

<meta name="viewport" content="width=device-width, initial-scale=1.0">



回答2:


text-size-adjust: none;, if you must force them not to do that.



来源:https://stackoverflow.com/questions/26570301/why-some-font-sizes-rendered-larger-in-mobile-browsers

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