Font size in portrait vs. landscape on mobile devices

后端 未结 2 1350
遇见更好的自我
遇见更好的自我 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条回答
  •  Happy的楠姐
    2021-01-13 18:48

    @hotshot309's comment (linking to this post from 55 Minutes) is the correct answer, but I fear as a comment it isn't getting the attention it deserves. What the OP (and likely anybody arriving here) should be using is this:

    -webkit-text-size-adjust: 100%;

    If you set it to none, the user won't be able to scale even if they want to (something that I, for one, often do on desktop when I don't feel like violating the monitor's personal space with my face). Using 100% prevents webkit from doing its default scaling while still allowing users the freedom to do so themselves.

提交回复
热议问题