Different resolution adaptation on the mobile side--using flexible

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.