Amfe-flexible,git Address: https://github.com/amfe/lib-flexible, according to the scalable layout scheme released by Ali's team.
How to use:
lib-flexibleThe use of libraries is very simple, just need to add the corresponding files in the Web flexible_css.js,flexible.js page
The first method is to download the file to your project and then add it through a relative path:
<script src="build/flexible_css.debug.js"></script><script src=" build/flexible.debug.js"></script>
or directly load the Ali CDN file:
<script src="http://g.tbcdn.cn/mtb/lib-flexible/0.3.4/?? Flexible_css.js,flexible.js"></script>
Container or component width is the main unit rem of use, the font size is still used units px .
Example Address: HTTPS://GITHUB.COM/AMFE/ARTICLE/ISSUES/17
There is also a constraint, if for iphone5 640*1136, so we limit the outermost parcel of the maximum width of the div is 640px, indicating 10rem;
pxconvert a visual manuscript into a conversion rem的 method: Pixel value to convert/640px * 10
Different resolution adaptation on the mobile side--using flexible