Learning Summary (15-12-21)

Source: Internet
Author: User

In recent days have been doing cell phone response, the main project requirements are compatible with PC-side and a variety of mobile phone screen display. In the process of doing the main encountered the following several problems.

First: The page of the module positioning or floating, will affect the response of the page, the solution is to let the module to the corresponding percentage of the parent element, and then use Display:-webkit-box (preceded by a compatible browser prefix) to make several modules occupy the same line.

Second: The width of the padding will always occupy position in the element, the response will be affected; The solution is to write the box-sizing:border-box in the corresponding element attribute, this sentence attribute to solve, so that the role of padding still exist, But browsers can also ignore the existence of padding.

Third: The page used to a tag, the span tag is more, these tags are row-level elements, in the process of using sometimes converted to block-level elements will affect the layout or response; The workaround is to set the width of the element to a percentage when converting to a block-level element, so there is no problem.

Now the Web page is doing more and more, some problems can be solved, but also to speed up. There's nothing wrong with the rest.

Learning Summary (15-12-21)

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.