Opa!
In this link, there is a lot of information about a type of function, called onscroll.
https://developer.mozilla.org/en-US/docs/Web/API/Window/onscroll
Basically, what it does is it acts on a drive specified by you.
For example:
Imagine the case where you run a page in a certain amount (for example, the 500px you specified).
Once you reach the amount of pixels you want, pass to this function a link that redirects to the particular div, with the ID you pass, and simulate a click.
Exemplifying more:
const scrollPixelsFunction = () => (
const link = document.getElementById('linkWhenClick');
return link.click()
);
window.onscroll = scrollPixelsFunction;
<div id="Scroll_pixels">
<p>Olá</p>
</div>
But you need to improve the function further, of course.
Just pass to it the amount of pixels you want to be directed from.
For this, take a look at the link. He explains about the definition of pixels, which is what you asked.
I don’t know if it’s good practice, but I think having the path makes it easier for you to find good manners.
Success.
There are many questions about this feature and even scroll to the next element. Take a look here and you will find examples. Your question as it is is a little vague...
– Sergio
sorry my lack of knowledge in the area turns out to be difficult, and I’m not able to find anything on the subject. can help me ??
– Dalmir Lopes