How does VUE's app project achieve font size? Similar to mobile browsers to control the size, size and size of fonts

font settings for browsers such as uc or qq. Can you dynamically control the app font size? Solve the problem, if it is too troublesome to write with js

Mar.07,2021

    The
  1. page is controlled by em+root font-size, so every time you change the font-size of root, you can zoom in and out, but the em writing style is too painful and the calculation is complex
  2. .
  3. rem+font-size this is the improved version of scheme 1, which is easy to calculate and convenient. The problem is that if all your page layouts are rem units, changing font-size will still affect your layout
  4. .
  5. pre-define several sizes of styles, js switching, so that the previous work is a little more, but can avoid confusion
Menu