css--layout

Source: Internet
Author: User

The layout of CSS is: Double-winged, multi-column, elastic, streaming, waterfall flow, responsive layout

Here are the main three common layout methods:

(1) Waterfall flow layout
Visually behaves as a jagged multi-column layout, with the page scroll bar scrolling down, loading blocks of data and attaching to the current trailer.
Advantages
A, effectively reduce the complexity of the interface, save space, do not need to bloated complex page number navigation links or buttons.
b, for touch-screen devices, the interaction is more intuitive: in the mobile application of the interactive environment, by sliding up the operation of the scrolling screen has become the most basic user habits, and the need for more precise operation than the click Link or button.
C, Higher participation: The interactive convenience of the above two points allows users to focus more on the content than on the operation, so that they are more willing to immerse in exploration and browsing.
Disadvantages
A, limited use cases:
The infinite scrolling method only applies to certain types of content in some particular type of product.
B, additional complexity:
Those used to create unlimited scrolling JS library, although claiming to be easy to use, but you will always need to be in their own products to different degrees of customization to meet your own needs, and these JS libraries in the browser and device compatibility and other aspects of the performance is uneven, testing and adjustment work needs to be done.
C, consider which way is more conducive to SEO, focus on one page dynamic loading data, and one page of the output compared.


(2), Flow-type layout
Fixed layouts and flow layouts are the two most common layouts used in web design. The fixed layout renders the original design effect of the Web page, the flow layout is not affected by the window width, and the flow layout uses the percent width to qualify the layout elements, which can be displayed reasonably according to the size of the client resolution.


(3), responsive layout
A website can be compatible with multiple terminals-not a specific version for each terminal.
Responsive layouts provide a more comfortable interface and a better user experience for users of different terminals, and as the current popularity of large-screen mobile devices, as more and more designers adopt this technology, we see not only a lot of innovation, but also a number of shaping patterns.
Advantages
A, the face of different resolution equipment flexibility strong
b, can quickly solve the problem of multi-device display adaptation
Disadvantages
A, compatible with a variety of equipment, high workload, low efficiency
b, the code is cumbersome, there will be hidden useless elements, loading time extended
C, in fact, this is a compromise nature of the design solution, a variety of factors affecting the best results
D, to a certain extent, changed the original layout structure of the site, there will be user confusion situation

Example of layout code:

(1) Two-column proportional layout

Css

1 #content{2 float: Left;3 width:500px;4 width:66%;5}6 7 #side{8 float: Right;9 width:500px;Ten width:33%; One}

Html

<id= "Content"></div><   ID= "side"></div>

(2) Variable width layout with fixed width of column and side column in 1-3-1

That is, the middle column and the left are fixed, and the right side is a widening

Css

. Header,. footer,. Container{margin:0 Auto;width:85%;}. Navi{Flaot: Left;width:150px;}. Content{float: Left;width:250px;}. Sidewrap{float: Right;width:100%;Margin-right:-400px;}. Side{Margin-right:400px;}. Footer{Clear:both;}

Html

<Div class= "header">Header</Div><Div class= "Container">Container<Div class= "Navi">Navi</Div>    <Div class= "Content">Content</Div>    <Div class= "Sidewrap">Sidewrap<Div class= "side">Side</Div>     </Div></Div><Div class= "Footer">Footer</Div>

css--layout

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.