CSS layout model (flow model, floating model, layer model)

Source: Internet
Author: User
In a Web page, elements have three layout models:
1. The flow model, the default, is that block-level elements are distributed from top to bottom, with widths of 100%. Inline elements are horizontally distributed from left to right. 2, floating model (float)Div, p, table, IMG and other elements can be set to float. The code for the two div displays in one line is as follows: div{    width:200px;    height:400px;    BORDER:2PX Red Solid;    Float:left;} 3. Layer model (layers) layer model has three forms: (1) absolute positioning (position:absolute) div{    width:200px;    height:400px;    BORDER:2PX Red Solid;    Position:absolute;    left:100px;    top:50px;} (2) relative positioning (position:relative) (3) fixed position (position:fixed) layer model, each element may appear stacked. Stacking order can be controlled with Z-index, z-index the big person on. Z-index the same time, depending on the CSS declaration order, the latter on the.

From: http://blog.csdn.net/ybdesire/article/details/49338569

CSS layout model (flow model, floating model, layer model)

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.