JavaScript-How does the HTML on the phone be formatted as follows???

Source: Internet
Author: User

This two rows of data are taken from the database an array, how to write html??? I small white seek the guidance of the Great God

Reply content:

This two rows of data are taken from the database an array, how to write html??? I small white seek the guidance of the Great God

Suggest to get a look at the flex layout of CSS3
Http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html?utm_source=tuicool

Bootstrap Solutions in the

1. Mobile is recommended to use flex layout, new and old syntax together, compatibility no problem
2.display:inline-block;width:50%, this will have a space problem, to set the font-size of the parent element to 0
3. It is not recommended to use float, because if the height is not high, the layout will be chaotic when both sides are not

With Bootstrap, you can achieve the responsive layout you need, http://www.runoob.com/bootstrap/bootstrap-tutorial.html.
However, it is recommended that you use the WebApp framework to tell you a few common WebApp frameworks:
1, JQuery Mobile: Low learning cost, low efficiency, cross-browser compatibility is the best;
2, Zepto:zepto is a lightweight alternative to jquery, more efficient than jquery, with the shortcomings of jquery;
3, Ionic: Based on the Angularjs do, the study cost is high, the efficiency is high;
4. Sencha Touch: The world's first mobile application framework to support HTML5 and CSS3 standards

float:left;width:50%

float:left;width:50%

Each block gives a width of 50% let after floating, be careful to set box-size to Border-box

Thank you for your help, I will try, do not come out to ask you

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