Position locate relevant knowledge about

A positioning position property

    1. Default Location:
        position: static;
    element normal block generation. Block-level elements generate a rectangular frame, as part of the document stream, inline elements is created one or more line boxes, placed in the parent element.

    2. Relative positioning:
        position: relative;
            A with respect to the original position to locate.
            B original position retains (without departing from the positioning of the document flow).
            C if it a targeting of the parent element is basically used as a positioning element exists.

    3 absolute positioning:
        position: absoult;
            a is not provided in the case relative position to the original position of the floating up (float up and float to float different).
            B does not retain the original position (from the document positioning stream).
            C if positioned. ancestor elements with respect to the positioning of the nearest ancestor positioning
            . If D is not positioned ancestor elements, positioned relative to the upper left corner of the viewport area

    4. the fixed positioning
        position: fixed;
            a fixed browser (viewport area. ) on a location (which may be provided on the container margin occluded vessel contents displayed)
            B does not retain the original position (normal flow departing positioning).
            

    positioning elements: positioning using the position property of the element
    Positioning element position changes with the following attributes: left, right, Top, bottom

    
    Z-index order of stacking
        larger values on the upper layer (higher priority display), the default value is 0
        absolute positioning element, the stacking order using


    the text generating excess ellipses:
    1 .white-space: nowrap; internal text does not wrap, wrap default
    2.overflow: hidden; overflow hidden content
    3.text-overflow: ellipsis; ellipsis (ellipsis) trim (Clip) of the default

    floating positioning block element is not exclusive line, you need to set up their own.

Guess you like

Origin www.cnblogs.com/nzcblogs/p/11073966.html