public enum Position extends Enum<Position> implements Key
Enum Constant and Description |
---|
ABSOLUTE
The element is removed from the normal document flow, and no space is created for the element in the page layout.
It is positioned relative to its closest positioned ancestor, if any; otherwise, it is placed relative to the initial containing block. |
FIXED
The element is removed from the normal document flow, and no space is created for the element in the page layout.
It is positioned relative to the initial containing block established by the viewport, except when one of its ancestors has a transform, perspective, or filter property set to something other than none |
RELATIVE
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, and left.
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. |
STATIC
The element is positioned according to the normal flow of the document.
The top, right, bottom, left, and z-index properties have no effect. This is the default value. |
STICKY
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, and left.
|
Modifier and Type | Method and Description |
---|---|
String |
value()
Returns the name value of property
|
static Position |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Position[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
checkAndGetIfValid, checkIfValid, compare, create, equals, getKeyByValue, getKeyByValue, hasKeyByValue, isValid
public static final Position STATIC
public static final Position RELATIVE
public static final Position ABSOLUTE
public static final Position FIXED
public static final Position STICKY
public static Position[] values()
for (Position c : Position.values()) System.out.println(c);
public static Position valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null