Update main.css, main.js

This commit is contained in:
XenGi 2022-02-08 21:12:53 +00:00
commit d35ccdeaaf
2 changed files with 8 additions and 19 deletions

View file

@ -1,19 +1,8 @@
#topbutton {
display: none; /* Hidden by default */
position: fixed; /* Fixed/sticky position */
bottom: 20px; /* Place the button at the bottom of the page */
right: 30px; /* Place the button 30px from the right */
z-index: 99; /* Make sure it does not overlap */
border: none; /* Remove borders */
outline: none; /* Remove outline */
background-color: red; /* Set a background color */
color: white; /* Text color */
cursor: pointer; /* Add a mouse pointer on hover */
padding: 15px; /* Some padding */
border-radius: 10px; /* Rounded corners */
font-size: 18px; /* Increase font size */
}
#topbutton:hover {
background-color: #555; /* Add a dark-grey background on hover */
#gototop_button {
display: none;
position: fixed;
bottom: 20px;
right: 30px;
z-index: 99;
cursor: pointer;
}

View file

@ -1,5 +1,5 @@
// Show button on scroll
window.onscroll = function() {toggle_gototop_button()};
window.onscroll = function() { toggle_gototop_button() };
function toggle_gototop_button() {
gototop_button = document.getElementById("gototop_button");