问题描述
我目前正在开发一个网站的移动版本,一切都很好,在 iPhone、Blackberry 和 Android 上运行良好.
Im currently working on a mobile version of a website, everything is great, works fine on an iPhone, Blackberry and Android.
我有一个小问题,不是什么大问题,但还是有点烦人.我有:
I have one slight problem, not a big deal but still a little annoying. I have:
标签设置为 18px 和粗体
标签设置为 12px 和粗体
标签设置为 12px 和正常
<h1>
tags set to 18px and bold<h2>
tags set to 12px and bold<p>
tags set to 12px and normal
现在在 iPhone 上纵向观看时一切看起来都很棒,但是当设备旋转到横向时 <h1>
标题变小(很难说,但可能比 标签?!
Now everything looks great on the iPhone when viewing in portrait, but when the device is rotated to landscape the <h1>
titles go smaller (hard to tell but possibly smaller than the <h2>
tags?!
这是我的css:
h1 {
color:#FFFFFF;
font-size:18px;
line-height:22px;
font-weight:bold;
margin-top:0px;
}
h2 {
font-size:12px;
color:#333333;
font-weight:bold;
margin-bottom:-5px;
}
p {
color:#333333;
font-size:12px;
line-height:18px;
font-weight:normal;
}
推荐答案
我相信你正在你的 CSS 中寻找这个:
I believe you are looking for this in your CSS:
html {
-webkit-text-size-adjust: none; /* Prevent font scaling in landscape */
}
这篇关于iPhone 的字体大小问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!