About absolute positioning

set absolute positioning for an element, but no top,right,bottom,left value, how will the element and its child elements be affected

Css
Mar.13,2021

Oh, I read it wrong. I thought fixed was positioned. Here is the original answer:

The position of the
element will be determined by its parent, while is not in the upper left corner (left, top is 0). There is no doubt that its children are determined by this fixed element. Refer to the following example:

http://jsfiddle.net/T2PL5/85/

.

has no effect on itself, but if the child element is also set to absolute positioning, it will be positioned by this element as the standard.


if not set, the performance of different browsers may be inconsistent

tried it, but it can't be reproduced. Maybe the browser's bug, has been repaired

.
Menu