em vs px… for mobile browsers

前端 未结 5 2079
醉酒成梦
醉酒成梦 2021-02-01 20:26

For desktop browser all modern browser uses Zoom functionality so we can use PX but if same site can be seen on mobile then would px not be good for zooming in mobile browsers.

5条回答
  •  粉色の甜心
    2021-02-01 20:29

    Pixels are fixed, one pixel will use the same place both on a mobile or on any display. Ems are relative, they are so called because they use the approximate size of the uppercase letter 'M'.

    So, yes, you should use ems, since they will be adjusted depending on the screen, and your fonts are likely to fit better with them.

提交回复
热议问题