search

Home  >  Q&A  >  body text

javascript - Questions about mobile adaptation

Currently there is a public account project that requires mobile adaptive layout. Please give me the perfect solution

I tested flexible.js myself, and the layout can meet the requirements, but what about the fonts? There are only three types of dpr, which cannot meet so many Android models. I checked a lot online and found that some directly use rem as the font unit, but This font display effect is not good.

Is there a perfect solution?

PHPzPHPz2752 days ago575

reply all(2)I'll reply

  • 某草草

    某草草2017-05-16 13:46:19

    Because the compatibility issues of Android devices are too complicated, domestic Android phones such as Android Pad and ZTE have many weird bugs, such as:

        viewport content 的写法要兼容各种奇葩 Android 设备,兼容测试的成本很高

    Therefore, dpr = 1 is processed uniformly for Android devices.

    My current solution is also using Taobao’s flexible.js, which is very powerful!

    You can refer to:
    https://www.zhihu.com/questio...
    https://github.com/amfe/artic...

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-16 13:46:19

    I have never done it on the mobile side. What I did is responsive. Using REM, you need to set the font-size on the body: 62.5%; I also have a good experience putting it on the mobile side:)

    reply
    0
  • Cancelreply