I have seen on some landing pages on some websites that when you scroll down it jumps to the content regardless of how much you scrolled.
How would that be achievable with HTML/CSS/Javascript?
Thanks.
I have seen on some landing pages on some websites that when you scroll down it jumps to the content regardless of how much you scrolled.
How would that be achievable with HTML/CSS/Javascript?
Thanks.
You should make in html id's to specified links, like that:
<a id="example1" href="#">TEST link1</a>
now in javascript you should get the position of this link by locating with DOM. Here you can read about it: https://www.w3schools.com/jsref/dom_obj_all.asp
On 'scroll' event you can provide this on link position.