有没有CSS或其他原因为什么Safari / iPhone会忽略一些字体大小设置?在我的特定网站上Safari上的Safari呈现一些font-size:13px文本大于font-size:15px文本。是否可能不支持某些元素的字体大小?
Are there CSS or other reasons why Safari/iPhone would ignore some font-size settings? On my particular website Safari on the iPhone renders some font-size:13px text larger than font-size:15px text. Does it maybe not support font-size on some elements?
推荐答案Joe的响应有一些很好的最佳实践,你描述的问题围绕着事实,如果移动Safari自动缩放文本,如果它认为文本将呈现太小。你可以使用CSS属性 -webkit-text-size-adjust 来解决这个问题。下面是一个如何将这个应用到你的身体,只是为iPhone:
Joe's response has some good best practices in it, but I think the problem you're describing centers around the fact that Mobile Safari automatically scales text if it thinks the text will render too small. You can get around this with the CSS property -webkit-text-size-adjust. Here's a sample of how to apply this to your body, just for the iPhone:
@media screen and (max-device-width: 480px){ body{ -webkit-text-size-adjust: none; } }更多推荐
一些字体大小的Safari(iPhone)
发布评论