The element with position:fixed property will be displayed at the specific offset (top, bottom, left and right) based on the position relative to the viewport. It will stay at same place when the page is scrolled. Whereas in position:sticky the element behave as relatively positioned element and once the containing block of the element crosses a specified threshold value it act as position:fixed element. So, the element switches its position based on the threshold value specified by top, bottom, left & right co-ordinates value.