What is the main difference between position: fixed; and position: sticky; in CSS?
- position: fixed; is affected by scrolling and becomes sticky.
- position: fixed; positions an element relative to the viewport, even during scrolling.
- position: sticky; becomes fixed after a certain scroll point.
- position: sticky; is not affected by scrolling and remains fixed.
position: fixed; keeps an element fixed relative to the viewport, while position: sticky; becomes fixed based on scroll position.
Loading...
Related Quiz
- In BEM methodology, the __ (double underscore) is used to denote a(n) ________ of a block.
- What is the primary advantage of using CSS sprites in web design?
- What CSS property is used to change the style of bullet points in an unordered list?
- The ________ property in CSS is used to apply an animation to an element.
- To control the white space around text within an element, the CSS property ________ is used.