When scrolling, stop at certain points

I need to scroll the image with background-position. To create a scrolling effect, I need to set scroll points, all this should happen in a specific block.

I need to create breakpoints, change breakpoints on scroll and assign it to a specific block. How to do it?