Change background color on scroll

Im looking to change the background color of my page every time the scroll gets into a “new block”. I’m pretty sure I don’t need code to do this and hope I can get some advice from you guys.

This is an example of what I want to do exactly! https://zilkysmilez.io/

Maybe change the opacity is the better way to do it?

you could place different colored rectangleshapes above eachother and to each ad a different “on scroll” animation with opacity and changing the position they start to fade out. With this you can achieve a colorchanging background on scroll.

1 Like

@neueMeta I think that is the best way!

@Mezontle_Website in case you would like to avoid animations altogether; another idea is (if you have the project navigate with pages stacked vertically), have several pages—each with different background color. You can pin your content and have it appear above pages so it stays in place even if. you move through the pages up/down.