123

BACK TO TOP BUTTON

TUTORIAL

Back to Top Buttons are used to scroll back to the top of a webpage. These buttons are usually used in websites with long webpages where-in navigating back at the top might be tiresome for the user. Back to Top buttons provide a shortcut link for the visitors that need swift access to the top of a webpage looking for navbar or trying to find the search bar. Considering these factors, we can say Back to Top Buttons are essential for websites with long webpages. So today, let us create a quick and easy Back to Top button. For this tutorial, we use jQuery. So before we move on to the coding part, let us quickly copy-paste the jQuery CDN link in between the of our HTML document.



Back to Top Buttons are used to scroll back to the top of a webpage. These buttons are usually used in websites with long webpages where-in navigating back at the top might be tiresome for the user. Back to Top buttons provide a shortcut link for the visitors that need swift access to the top of a webpage looking for navbar or trying to find the search bar. Considering these factors, we can say Back to Top Buttons are essential for websites with long webpages. So today, let us create a quick and easy Back to Top button. For this tutorial, we use jQuery. So before we move on to the coding part, let us quickly copy-paste the jQuery CDN link in between the of our HTML document.



Back to Top Buttons are used to scroll back to the top of a webpage. These buttons are usually used in websites with long webpages where-in navigating back at the top might be tiresome for the user. Back to Top buttons provide a shortcut link for the visitors that need swift access to the top of a webpage looking for navbar or trying to find the search bar. Considering these factors, we can say Back to Top Buttons are essential for websites with long webpages. So today, let us create a quick and easy Back to Top button. For this tutorial, we use jQuery. So before we move on to the coding part, let us quickly copy-paste the jQuery CDN link in between the of our HTML document.



Back to Top Buttons are used to scroll back to the top of a webpage. These buttons are usually used in websites with long webpages where-in navigating back at the top might be tiresome for the user. Back to Top buttons provide a shortcut link for the visitors that need swift access to the top of a webpage looking for navbar or trying to find the search bar. Considering these factors, we can say Back to Top Buttons are essential for websites with long webpages. So today, let us create a quick and easy Back to Top button. For this tutorial, we use jQuery. So before we move on to the coding part, let us quickly copy-paste the jQuery CDN link in between the of our HTML document.



Back to Top Buttons are used to scroll back to the top of a webpage. These buttons are usually used in websites with long webpages where-in navigating back at the top might be tiresome for the user. Back to Top buttons provide a shortcut link for the visitors that need swift access to the top of a webpage looking for navbar or trying to find the search bar. Considering these factors, we can say Back to Top Buttons are essential for websites with long webpages. So today, let us create a quick and easy Back to Top button. For this tutorial, we use jQuery. So before we move on to the coding part, let us quickly copy-paste the jQuery CDN link in between the of our HTML document.



Back to Top Buttons are used to scroll back to the top of a webpage. These buttons are usually used in websites with long webpages where-in navigating back at the top might be tiresome for the user. Back to Top buttons provide a shortcut link for the visitors that need swift access to the top of a webpage looking for navbar or trying to find the search bar. Considering these factors, we can say Back to Top Buttons are essential for websites with long webpages. So today, let us create a quick and easy Back to Top button. For this tutorial, we use jQuery. So before we move on to the coding part, let us quickly copy-paste the jQuery CDN link in between the of our HTML document.



Back to Top Buttons are used to scroll back to the top of a webpage. These buttons are usually used in websites with long webpages where-in navigating back at the top might be tiresome for the user. Back to Top buttons provide a shortcut link for the visitors that need swift access to the top of a webpage looking for navbar or trying to find the search bar. Considering these factors, we can say Back to Top Buttons are essential for websites with long webpages. So today, let us create a quick and easy Back to Top button. For this tutorial, we use jQuery. So before we move on to the coding part, let us quickly copy-paste the jQuery CDN link in between the of our HTML document.



Back to Top Buttons are used to scroll back to the top of a webpage. These buttons are usually used in websites with long webpages where-in navigating back at the top might be tiresome for the user. Back to Top buttons provide a shortcut link for the visitors that need swift access to the top of a webpage looking for navbar or trying to find the search bar. Considering these factors, we can say Back to Top Buttons are essential for websites with long webpages. So today, let us create a quick and easy Back to Top button. For this tutorial, we use jQuery. So before we move on to the coding part, let us quickly copy-paste the jQuery CDN link in between the of our HTML document.



Back to Top Buttons are used to scroll back to the top of a webpage. These buttons are usually used in websites with long webpages where-in navigating back at the top might be tiresome for the user. Back to Top buttons provide a shortcut link for the visitors that need swift access to the top of a webpage looking for navbar or trying to find the search bar. Considering these factors, we can say Back to Top Buttons are essential for websites with long webpages. So today, let us create a quick and easy Back to Top button. For this tutorial, we use jQuery. So before we move on to the coding part, let us quickly copy-paste the jQuery CDN link in between the of our HTML document.



Back to Top Buttons are used to scroll back to the top of a webpage. These buttons are usually used in websites with long webpages where-in navigating back at the top might be tiresome for the user. Back to Top buttons provide a shortcut link for the visitors that need swift access to the top of a webpage looking for navbar or trying to find the search bar. Considering these factors, we can say Back to Top Buttons are essential for websites with long webpages. So today, let us create a quick and easy Back to Top button. For this tutorial, we use jQuery. So before we move on to the coding part, let us quickly copy-paste the jQuery CDN link in between the of our HTML document.



Back to Top Buttons are used to scroll back to the top of a webpage. These buttons are usually used in websites with long webpages where-in navigating back at the top might be tiresome for the user. Back to Top buttons provide a shortcut link for the visitors that need swift access to the top of a webpage looking for navbar or trying to find the search bar. Considering these factors, we can say Back to Top Buttons are essential for websites with long webpages. So today, let us create a quick and easy Back to Top button. For this tutorial, we use jQuery. So before we move on to the coding part, let us quickly copy-paste the jQuery CDN link in between the of our HTML document.



Back to Top Buttons are used to scroll back to the top of a webpage. These buttons are usually used in websites with long webpages where-in navigating back at the top might be tiresome for the user. Back to Top buttons provide a shortcut link for the visitors that need swift access to the top of a webpage looking for navbar or trying to find the search bar. Considering these factors, we can say Back to Top Buttons are essential for websites with long webpages. So today, let us create a quick and easy Back to Top button. For this tutorial, we use jQuery. So before we move on to the coding part, let us quickly copy-paste the jQuery CDN link in between the of our HTML document.

.my_bttn{ height: 45px; /*button的高*/ width: 45px; /*button的寬*/ background-color: #FFC9C9; border: none; color: black; position: fixed; bottom: 30px; right: 30px; border-radius: 50px; cursor: pointer; outline: none; display: none; } .my_bttn:hover{ transform: scale(1.05) translateY(-5px); } $(document).ready(function(){ $(window).scroll(function(){ if($(window).scrollTop()>100){ $('.my_bttn').fadeIn(250); } else{ $('.my_bttn').fadeOut(250); } }); $('.my_bttn').click(function(){ $('html,body').animate( {scrollTop:0},400 ); }); });

留言