Scroll-to Buttons
How to create a scroll-to button
How to create a scroll-to button
A scroll-to button is a button that once clicked, scrolls to a section of a page that we want. In order to create a scroll-to button follow these steps.
Assign to the section that you want to scroll to an id, as in
<section id="last" class="section section-normal">
Create a link anywhere inside the section that you want to add the scroll-to button to. Set the href to be the value of the id that you previously set for the section, preceeded by a #
.
Add the class scroll-to-id to the link, as in
<a href="#last" class="btn btn-warning btn-lg scroll-to-id" target="_self">scroll down</a>
Clicking on this button now should scroll to the section with the id last
.