Position class abstract
The position CSS property sets how an element is positioned in a document
See also:
- ZIndex for controlling the stack order of positioned elements.
Read more: MDN position
Constructors
- Position.absolute({Unit? top, Unit? left, Unit? bottom, Unit? right})
-
The element is removed from the normal document flow, and no space is created for the element in the page layout.
The element is positioned relative to its closest positioned ancestor (if any) or to the initial containing block.
Its final position is determined by the values of
top,right,bottom, andleft.constfactory - Position.fixed({Unit? top, Unit? left, Unit? bottom, Unit? right})
-
The element is removed from the normal document flow, and no space is created for the element in the page layout.
The element is positioned relative to its initial containing block, which is the viewport in the case of visual
media. Its final position is determined by the values of
top,right,bottom, andleft.constfactory - Position.relative({Unit? top, Unit? left, Unit? bottom, Unit? right})
-
The element is positioned according to the normal flow of the document, and then offset relative to itself based
on the values of
top,right,bottom, andleft. The offset does not affect the position of any other elements; thus, the space given for the element in the page layout is the same as if position were static.constfactory - Position.sticky({Unit? top, Unit? left, Unit? bottom, Unit? right})
-
The element is positioned according to the normal flow of the document, and then offset relative to its nearest
scrolling ancestor and containing block (nearest block-level ancestor), including table-related elements, based
on the values of
top,right,bottom, andleft. The offset does not affect the position of any other elements.constfactory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited