0

我看到很多请求询问如何在手机旋转到横向模式时阻止 iphone 调整文本大小,我希望这发生在 android 手机上,但就像在 iphone 上一样。我研究的所有内容都指向我使用 -webkit-text-size-adjust: none; 关闭 iphone 上的功能。

当设备像 iphone 一样旋转时,css 中是否有某种东西会强制 android 浏览器实际上调整此文本的大小?

4

1 回答 1

1

媒体查询非常适合这种事情。我见过最多的是min-widthmax-width但您也可以orientation用作标志,如此处所述:http ://www.1stwebdesigner.com/css/how-to-use-css3-orientation-media-queries/

/* Portrait */
@media screen and (orientation:portrait) {
    /* Portrait styles */
}
/* Landscape */
@media screen and (orientation:landscape) {
    /* Landscape styles */
}

这将允许您为网站的纵向和横向视图指定不同的字体大小。

于 2012-04-18T08:40:10.423 回答