Home  >  Article  >  Web Front-end  >  CSS examples of relative positioning and absolute positioning_CSS/HTML

CSS examples of relative positioning and absolute positioning_CSS/HTML

WBOY
WBOYOriginal
2016-05-16 12:11:261704browse



A: No postion is set, the general nesting relationship is
< /div>



B: Only the outer div is set relative, general nesting relationship
< ;/div>



C: Only the inner div is set to absolute, the document is a nested relationship, the page The inner div is floated [non-float], positioned relative to the page, and has nothing to do with the outer div.




A: No postion is set, the general nesting relationship is
< /div>



B: Only the outer div is set relative, general nesting relationship
< ;/div>



C: Only the inner div is set to absolute, the document is a nested relationship, the page The inner div is floated [non-float], positioned relative to the page, and has nothing to do with the outer div.



D: The outer div is set to relative, and the inner div is set to relative The div is set to absolute, and the inner div floats and is positioned relative to the outer div




D: The outer div is set to relative, the inner div is set to relative, and the inner div is floated and positioned relative to the outer div



E: This is to illustrate the boundary problem . -10 != reverse 10px spacing

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
Previous article:On having layout_CSS/HTMLNext article:On having layout_CSS/HTML