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

前端 未结 3 1171
隐瞒了意图╮
隐瞒了意图╮ 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:49

    Fonts using a specific pixel size are not relative (along with several others). Zooming changes that relative information.

    From http://www.westciv.com/style_master/academy/css_tutorial/properties/values.html

    Name        Abbrev. Explanation                             Relative?
    em          em      The height of a font                    yes
    ex          ex      The height of the letter x in a font    yes
    pica        pc      1 pica is 12 points                     no
    point       pt      1/72 of an inch                         no
    pixel       px      One dot on a screen                     no
    millimeter  mm      Printing unit                           no
    centimeter  cm      Printing unit                           no
    inch        in      Printing unit                           no
    

提交回复
热议问题