CSS Position Properties
VIDYA ACADEMY
Position Propeties :-
There are five types of css position propertie.
- Static
- Absolute
- Fixed
- Relative
- Sticky
- Static :-
- Absolute :-
- Fixed :-
- Relative :-
- Sticky :-
Default value. Elements render in order, as they appear in the ducument flow.
The element is positioned relative to its first positioned ( not static ) ancestor element.
The element is positioned relative to the browser window.
The element is positioned relative to its normal position, so "left:20px;"adds 20 pixels to the elements left position.
The element is positioned based on the user's scoll position.
A sticky element toggles between relative and fixed, depending on the scroll position.It is positioned reltive until a given offset positionis met in the viewport-then it "sticks"in place ( like poition:fixed).
Note :- Not supported in IE/Edge 15 or earlier. Supported in safari from veraion 6.1 with a webkit prefix.
टिप्पणियाँ
एक टिप्पणी भेजें
thank you