1.

How many selector types exists in CSS?

Answer»

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.



Discussion

No Comment Found