I'm trying to achieve the following scrolling behavior in my project:
I want div2 to scroll beneath div1 and div1 to stay on the top, now that is doable by setting div1's position as sticky, but the trick is that I want div3 to stay exactly under div1, and div4 to scroll beneath div3, and for div5 to stay exactly under div4 upon scrolling, to end with the following state:
Is there a way to do this other than setting div3 and div5 positions to sticky? Since I don't want to set top:x because x varies.