javascript - Questions about mobile adaptation
PHPz
PHPz 2017-05-16 13:44:19
0
2
572

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?

PHPz
PHPz

学习是最好的投资!

reply all(2)
某草草

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...

我想大声告诉你

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:)

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template