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

htmlcss note positioning_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:47:12
Original
1057 people have browsed it

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; >

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template