rem and mobile layout

  The pain point of mobile layout is: compatible with mobile devices of various resolutions, which are also mobile phones, and the resolution range of iPhone4-iPhoneX is already very wide; if you use px for layout, there will obviously be problems;

  In the common pixel units px, em, and rem, em is the unit relative to the font-size of the parent element. I personally think that in use, em will be confusing; rem is relative to the root element and HTML, which is convenient for layout according to screen resolution. ;

  The current mobile layout method: "horizontal percentage + vertical rem", while using flex layout;

 

https://www.cnblogs.com/ysshuai/p/6694339.html

 

Guess you like

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