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.