adjust back to top button
This commit is contained in:
parent
e47e495911
commit
0fb4e0af5c
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -1,3 +1,3 @@
|
||||
{
|
||||
"liveServer.settings.port": 5509
|
||||
"liveServer.settings.port": 5510
|
||||
}
|
||||
@ -161,7 +161,7 @@ let mybutton = document.getElementById("top");
|
||||
window.onscroll = function() {scrollFunction()};
|
||||
|
||||
function scrollFunction() {
|
||||
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
|
||||
if (document.body.scrollTop > 130 || document.documentElement.scrollTop > 130) {
|
||||
mybutton.style.display = "block";
|
||||
} else {
|
||||
mybutton.style.display = "none";
|
||||
|
||||
@ -102,19 +102,22 @@ form{
|
||||
}
|
||||
|
||||
#top {
|
||||
font-family: "Autour One", serif; /* font-family: "Playwrite AU SA", serif; */
|
||||
|
||||
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 */
|
||||
bottom: 12px; /* Place the button at the bottom of the page */
|
||||
right: 10px; /* 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: #d1fff8; /* Set a background color */
|
||||
background-color: #0dc9ba; /* Set a background color */
|
||||
cursor: pointer; /* Add a mouse pointer on hover */
|
||||
padding: 15px; /* Some padding */
|
||||
border-radius: 10px; /* Rounded corners */
|
||||
font-size: 18px; /* Increase font size */
|
||||
border:solid 1px #363636;
|
||||
box-shadow: 3px 3px 3px #363636 ;
|
||||
}
|
||||
|
||||
#top:hover {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user