Open project code one side and this readme another side to better understand what I'm trying to say.
Check out Demo: https://simplifiedweb.github.io/ScrollingZoom/
Simply we target the scrollTop property Refer this Readme From https://github.com/SimplifiedWeb/Scrolling-Indicator-SimpleWay
You'll better understand what is going on we are targeting the scrollTop property and calculating the value. And putting it on Target element.
Remember When we scroll Down scrollTop property give you the increase value, and if we scroll top we are getting the decrease value.
that value we are calculating and puttin on the target element.
Hope This explanation Helps You.