[Exercise] responsive Layout

Source: Internet
Author: User

For more information, see http://www.netmagazine.com/tutorials/build-basic-responsive-site-css.

The author explains that responsive design should not display different content for different terminals. When users can find the content on the pc, they cannot find it on the Mobile End, this is a confusing thing. Therefore, the responsive design requires proper scaling to display the appropriate layout for different devices, rather than changing the content. Therefore, the responsive layout is implemented by the streaming layout (setting the width of each element by percentage) and the Media Query of css3.

Below is a simple responsive layout exercise:

Effects can refer to http://www.netmagazine.com/files/tutorials/demos/2013/01/build-a-basic-responsive-site-with-css/demo/demo.html

1. First, determine the document structure and layout in two columns.

Responsive "skip to main content Demo Home About Work Contact Main section Lorem (Omitted) Sub-section Lorem (omitted)

Original Author insertRespond. min. jsMake sure the ie6-8 can run, because I did not do the compatibility test, so did not reference this js, interested students can try.

Join"

It is best to set a max-width to avoid over-amplification on the large screen, and set the width of the image to 100%, which can adapt to the stream layout.

{:;:;:;:;}{:;:;:;}{:;:;}{:;:;:;:;:;:;}{:;:;}{:;:;}{:;}{:;}{:;:;:;}{:;}

 

3. Add css adapted to mobile devices. You can use either of the following methods:

{:;        }{:;:;:;:;        }{:;:;:;:;            }{:;:;:;                }

An external reference is added to the html head.

 

In addition, you can also provide reduced images for mobile devices to save traffic and reduce loading time.

 

Now the entire exercise is over.

 

 

 

Related Article

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.