Tired of scrolling back up when you've hit the bottom of your blog?
Here is a quick guide on how to add a cute, floating scroll-to-top button to your Tumblr theme. It fades in when you scroll down and glides smoothly back to the top when clicked!
The best part? You only need to copy and paste one thing.
The Step-by-Step
Go to Edit Appearance > Edit Theme > Edit HTML.
Click inside the code box and press Ctrl+F (or Cmd+F on Mac).
Search for (it is usually at the very bottom).
Paste the code below right before the tag.
Update Preview and Save!
The Code
(Copy everything in this box!)
<style> /* --- THE STYLING --- */ #scrollToTopBtn { position: fixed; bottom: 30px; right: 30px; z-index: 999999; /* Sits on top of everything */ border: none; outline: none; background-color: {color:Post Background}; /* Matches your post color */ cursor: pointer; padding: 12px; border-radius: 50%; opacity: 0; /* Hidden by default */ pointer-events: none; transition: opacity 0.4s, transform 0.2s; box-shadow: 0 4px 15px rgba(0,0,0,0.15); border: 1px solid {color:Borders}; } #scrollToTopBtn.show { opacity: 1; pointer-events: auto; } #scrollToTopBtn:hover { transform: translateY(-5px); /* Cute hop effect */ } /* The Icon Settings */ #scrollToTopBtn img { width: 20px; /* Size of the icon */ height: auto; display: block; /* filter: invert(1); <--- UNCOMMENT THIS LINE if you need a white icon! */ } </style> <div id="scrollToTopBtn" onclick="scrollToTop()"> <img src="https://static.tumblr.com/obptcxj/p59mo0l0s/pin.png" alt="Scroll to Top"> </div> <script> var mybutton = document.getElementById("scrollToTopBtn"); // Show button when scrolling down 100px window.onscroll = function() {scrollFunction()}; function scrollFunction() { if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) { mybutton.classList.add("show"); } else { mybutton.classList.remove("show"); } } // Smooth scroll to top function function scrollToTop() { window.scrollTo({top: 0, behavior: 'smooth'}); } </script>
How to Customize
Change the Icon: Look for the line that starts with <img src="β¦. Replace the URL inside the quotes with any image URL you like!
Change the Color: If your icon is black but your theme is dark, find /* filter: invert(1); β¦ / in the CSS section and remove the / and */ to turn the icon white.
Change the Position: In the CSS section, change bottom: 30px; or right: 30px; to move it around.
It would look super cute on your blogβ¦ and even cuter if you tagged me in the caption. Just saying. π
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
β Live Streamingβ Interactive Chatβ Private Showsβ HD Quality
Anya is LIVE right now
FREE
Free to watch β’ No registration required β’ HD streaming
Hello, really hoping there is someone out there who can help me with this, I've been trying to sort this for hours and can't figure it out.
I am looking to create a private blog to organise my work, and am wanting to organise this using tags. The theme I am using is this
Within this, I would use the left side 'status, allegiance, role, misc filter' to organise everything. When you click on one of these buttons (for example under 'role' pressing 'pawn', it would show all posted with the 'pawn' tag.) This is currently how the theme functions and it is great. However I am facing two problems.
First of all, I would like to be able to select two buttons under one header (for example under 'role' pressing 'pawn' and 'knight', it would show all posted with the 'pawn' tag, and 'knight' tag, rather than only being able to select one filter per group)
Secondly, when I add more filters to the left, it does not allow me to see all of them. It fills up the space and doesn't allow me to scroll down, meaning most of them are hidden. Is there a way to add a scroll bar to this section?
I have tried fiddling around with the code and looking at multiple examples to compare what is different but I just can't figure it out.
If anyone is able to help with anything at all it would be a huge help!
Now, if you want to change it. Go to your CSS, or find this in your HTML <style> / <style type=css""> and copy paste the code above.
::-webkit-scrollbar { (THIS IS FOR STYLE OF THE SCROLLBAR ITSELF)
width: 10px; (HOW THICK YOU WANT IT TO BE)
background: #000000; (THE BACKGROUND OF THE SCROLLBAR)
}
::-webkit-scrollbar-thumb {
background: #458eff; (THE COLOR OF THE SCROLLBAR)
border-radius: 5px; (HOW CIRCLE YOU WANT YOUR SCROLLBAR TO LOOK LIKE)
}
You can use this website for the color codes.
Disclaimer: The code is not mine, I just heavily tweaked it from the owner.
Also, there are some time that the cursor will change when you hover it over the links. Copy and paste the code over your links section also. It would look something like this a{ or a:hover{
Now, here's the surprising part. If you want to change the image of your cursor, use this code instead:
cursor: url(URL IMAGE OF YOUR CURSOR), auto;
Then, look for any cursor image you want it to be then copy and paste the link to the "URL IMAGE OF YOUR CURSOR", in between the parentheses. The URL should start with https:// for it to work. You may try searching at google or Pinterest with the cursor you want and change the url to it.
You may change the colors of it using this website.
::selection {
color: {color:background}; (THIS IS FOR THE COLOR OF THE TEXT WHILE SELECTING IT)
background: {color:text}; (THIS IS FOR THE BACKGROUND WHILE SELECTING IT)
}
Disclaimer: This code is not included on the theme I am currently using and that I have tweaked it so it can conveniently help you in editing your blog.
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
β Live Streamingβ Interactive Chatβ Private Showsβ HD Quality
Anya is LIVE right now
FREE
Free to watch β’ No registration required β’ HD streaming
iβve been trying to change my theme but i canβt. When I paste the new html code I got, a tumblr sign pops up and says I have to use a βnon HTTP-URLsβ theme. Why is that? how can I fix it?
Similar thing happened when I wanted to change the ask code for a faq one (add the ask box on that page).Β
Pleeeaseee, Iβll be so grateful if you guys can help me out.Β