In this follow up to my responsive website video I'll show you how to create clickable links that scroll to different points on the page. First we'll look at a pure HTML and CSS implementation using anchor tags and CSS scroll behaviour with no JavaScript at all. Then we'll look at two different ways to do this using JavaScript: a simpler method which you should find straightforward if you watched the menu section of my previous video, and finally a more advanced technique using HTML data attributes along with the JavaScript querySelector and forEach methods.
Let's get on with it!
I'm using replit to code this site but any text editor will do!
https://replit.com
コメント