Why the font size won't change with browser zoom in?

前端 未结 3 1173
隐瞒了意图╮
隐瞒了意图╮ 2020-12-15 22:32

In most of websites, while I change the zoom level of browsers, the font size will also increase and help user to see them. For some reasons, that just won\'t work on my new

3条回答
  •  情深已故
    2020-12-15 22:58

    If you're using a fixed-point width for your font-size settings (e.g.: pixels), then your font size will remain unchanged when the user zooms. If you want the font to enlarge or diminish when the user zooms in/out, then consider using em as your unit (1 em = 100% of the default font size on the user's machine).

提交回复
热议问题