"CSS positioning position" course notes

Source: Internet
Author: User

This is the note I made when I studied the course CSS positioning position!

The content of this section
    • Three ways to lay out HTML
    • Position Optional Parameters
    • Z-index
    • The difference between a box model and a positioning
    • Side bar Navigation Follow instance
Three ways to lay out HTML

Three layouts: standard flow, floating, positioning

Two main elements: block-level Element (div,h1-6,table,ol,ul,li,p), inline element (a,span,img,input)

Position Optional Parameters

Static (normal arrangement in standard flow)

Relative (relative positioning)

Absolute (absolute positioning)

Fixed (out of normal document flow, login popup, inline ad, not subject to parent element)

Inherit (inherits the position property of the parent element)

Z-index

Z-index large elements will overwrite z-index small elements

Z-index elements for Auto do not participate in hierarchical comparisons

Z-index are negative and will be overwritten by levels in the normal stream

Only works on position for positional properties other than static

The benefits of the parent element hierarchy

The difference between a box model and a positioning

The box model is moved by internal and external margins, and positioning is moved by position.

The location instance of the login interface of MU class net (with mask)

Side bar Navigation Follow instance

First level column with Div, two level column with UL and Li, three level column with Div

Three level column with absolute positioning on the right to expand

Level two or three column starts with display:none , then useshover:display:block

"CSS positioning position" course notes

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.