Enum Position

    • Enum Constant Summary

      Enum Constants 
      Enum Constant 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.
    • Enum Constant Detail

      • STATIC

        public static final Position 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.
      • RELATIVE

        public static final Position 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.
      • ABSOLUTE

        public static final Position 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. Its final position is determined by the values of top, right, bottom, and left.
      • FIXED

        public static final Position 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
      • STICKY

        public static final Position 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. The offset does not affect the position of any other elements.
    • Method Detail

      • values

        public static Position[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Position c : Position.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Position valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • value

        public String value()
        Description copied from interface: Key
        Returns the name value of property
        Specified by:
        value in interface Key
        Returns:
        the name value of property