Home  >  Article  >  Web Front-end  >  htmlcss note positioning_html/css_WEB-ITnose

htmlcss note positioning_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:47:121029browse

1. Positioning:

Position: relative (relative)

Does not affect the characteristics of the element itself;

Does not cause the element to infer the original document flow; still occupy the place where you are.

Positioned element control: top/right/bottom/left Positioned element offset.

Absolute (absolute positioning)

Make the element out of the document flow,

Make the inline element support width and height,

Quick attribute label content to expand the width .

  It is offset relative to the entire document, not relative to its original position or body;

  * If there is a positioning parent, it will be positioned relative to the positioning parent. If not, Relative to document positioning

Relative positioning is generally used in conjunction with absolute positioning

Positioning elements default to the latter having a higher level than the former.

Positioning level: z-index: [number]; Default 0

 

2. Transparency: IE incompatible; Standard: Opacity: opacity: 0~1;

ie private: filter:alpha (opacity=0~100);

>

Position: absolute; top: 50%; left: 50%; margin-top:-Apx; margin-left:-Bpx;

A is the height of the login frame; B is the login frame The width of the body; also consider the border, padding, etc.,

4.pisition: fixed;

Fixed positioning;

The characteristics are basically the same as absolute positioning, the difference is Always positioned relative to the entire document;

IE6 does not support fixed positioning; if compatibility is required, JS positioning is required.

5.position: inherit;

Inherited from parent, basically not used.

6.position: static; >

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn