Font size in portrait vs. landscape on mobile devices

后端 未结 2 1347
遇见更好的自我
遇见更好的自我 2021-01-13 18:23

I am developing a mobile website but have encountered this problem - a font size of 14px is displaying much larger in landscape than in portrait. However, it seems to be bas

2条回答
  •  时光取名叫无心
    2021-01-13 18:55

    Apple rescales the font-size when the viewport changes to increase readability. It doesn't matter that the font-size is set to something absolute like 14px. To disable it, you can use the following CSS:

    -webkit-text-size-adjust: none;
    

提交回复
热议问题