I've been trying to achieve this scrolling effect from this website: https://livingbeautyinc.com. As you scroll, the previous content stays on the same position and the new content stacks on top of the old one. I've tried using the position:sticky
then set the z-index
for each component but it doesn't seem to work. Anyone has any idea how to make this scrolling effect with CSS?
Source: https://codepen.io/daniel5120/pen/PoEoaEP So ideally I want to make the contents on the first container stay exactly the same where they are and then the second element stays on top of the first one.