Choose one of the two adaptive mobile terminals (rem, viewport)

Mobile adaptive solution

One is to use the rem unit to calculate the font-size of the html element according to the width of the browser window. Here, this section of js must be loaded in a limited manner. The other is to use the proportionally scaled viewport to set the width to a fixed value (750 )

Equal scaling


The advantage is that it is simple and rude, and you can directly restore the size of the design
.

rem+dynamic js sets font-size

The advantage is that the application is physical pixels, which are clear
. The disadvantage is: 1. When the loading is slow, there will be a page size that does not recognize the rem, which is messy. You can get a loading and display it after loading the calculation.
2.3.33333, sometimes the decimal part is lost and the display is incorrect.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324940033&siteId=291194637