1.

Which of the following position is based on the user’s scroll position?(a) fixed(b) sticky(c) relative(d) staticThis question was posed to me during an internship interview.The doubt is from Sliding Doors & Clipped Sliding Doors topic in section Layout & Images of CSS

Answer» RIGHT option is (b) STICKY

For EXPLANATION: An element with position: sticky, is positioned on the USER’s scroll position. A sticky element TOGGLES between relative and fixed, depending on scroll position, It is positioned relative until a given offset position is met in the viewport, then it “sticks” in place.


Discussion

No Comment Found

Related InterviewSolutions