Position
Atomic props for controlling how an element is positioned.
Atomic Props | CSS Properties |
---|---|
static | position: static; |
fixed | position: fixed; |
absolute | position: absolute; |
relative | position: relative; |
sticky | position: sticky; |
position={value} | position: {value}; |
#
StaticUse static
props to set static position for an element.
SyntaxError: Unexpected token (1:8) 1 : return () ^
LIVE DEMO
#
RelativeUse relative
props to set relative position for an element.
SyntaxError: Unexpected token (1:8) 1 : return () ^
LIVE DEMO
#
AbsoluteUse absolute
props to set absolute position for an element.
SyntaxError: Unexpected token (1:8) 1 : return () ^
LIVE DEMO
#
FixedUse fixed
props to set fixed position for an element.
SyntaxError: Unexpected token (1:8) 1 : return () ^
LIVE DEMO
#
StickyUse sticky
props to set sticky position for an element.
SyntaxError: Unexpected token (1:8) 1 : return () ^
LIVE DEMO
#
Positionif the preset atomic props can not be satisfied,you can use position
props.
SyntaxError: Unexpected token (1:8) 1 : return () ^
LIVE DEMO