Summary of div CSS absolute positioning (absolute) and relative positioning (relative)_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:27:08
Original
1155 people have browsed it

1. When there is no external Div, there is no difference between setting absolute positioning (absolute) and relative positioning (relative)

2. Relative positioning occupies the position while absolute Positioning does not take up position and will float on top of other Divs

3. If the parent Div does not set positioning and the child Div needs to set the position, it does not matter whether the child Div sets absolute or relative positioning

4 If the parent Div is set to positioning, the child Div is set to absolute positioning relative to the browser. If the child Div is set to relative positioning, the position is relative to the parent Div.

5 If the statistical elements are all relative, then when setting the css (left) of the second div, it is relative to the distance from the first

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