How to Install Back To Top Button with SVG icon on blogger | dn420

Please wait 0 seconds...
Scroll Down and click on Go to Link for destination
Congrats! Link is Generated

This time Dn420 will share tips on this topic How to Install the Back To Top Button with SVG icon on blogger

What is the "Back To Top Button with SVG Icon"?

The Back To Top button with SVG has the same function as the back to top button as in the previous tutorial on this blog, the only difference is that the icon on this button uses SVG which is lighter than the image format icon. This is the best way to encourage users to browse more content quickly.

How to Install Back To Top Button with SVG icon on blogger | dn420


Why do we need to use "Back To Top Button with SVG Icon on our blog"?

The Back To Top button with SVG has a very important role for a site with content that has long page content, for those sites that have a lot of information on the page will make other content skip unwittingly scrolling far when down the page.

Alright, for those who want to install it perfectly please follow these  simple steps:


How to Install Back To Top Button with SVG?

The first step, open Blogger Dashboard > Then Click the Theme menu > Next Click Edit HTML next to customize > Then add the code below right before </head> tag.

<style>
/* Back To Top by  Dn420 */
.backtotop{display:none;background:#3c6382;color:#fff;font-size:1.4em;width:40px;height:40px;line-height:40px;outline:0;z-index:999;bottom:20px;right:20px;position:fixed;border-radius:5px;padding:0;text-align:center;cursor:pointer;opacity:1;transition:all .25s}.backtotop svg{width:24px;height:24px;transform:rotate(90deg);vertical-align:middle;transition:all .25s}.backtotop:hover{background:#0a3d62}
</style>

Next, add the two codes below before </body> tag

<div class='backtotop hide'><svg viewBox='0 0 24 24'>
  <path d='M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z' fill='#fff'/>
</svg></div>


<script>
//<![CDATA[
$(function(){$(window).scroll(function(){$(this).scrollTop()>100?$(".backtotop").fadeIn():$(".backtotop").fadeOut()}),$(".backtotop").click(function(){return $("html,body").animate({scrollTop:0},400),!1})});
//]]>
</script>


When all steps are complete the next step Save the theme and that's it see the results on your blog.

Demo

Conclusion:

Thanks for reading the  How to Install Back To Top Button with SVG icon on blogger article for so long. If you have an opinion, don't forget to let us know in the comments. And if the post seems helpful, don't forget to heal your friends. Thanks.



Go to Link

About the Author

Droidnur is the Founder & CEO of droidnur.eu.org & Publisher with an Entrepreneur. He is Also a Collage Student & Full Time Passionate Blogger.

إرسال تعليق

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.