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()};
|
window.onscroll = function() {scrollFunction()};
|
||||||
|
|
||||||
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";
|
mybutton.style.display = "block";
|
||||||
} else {
|
} else {
|
||||||
mybutton.style.display = "none";
|
mybutton.style.display = "none";
|
||||||
|
|||||||
@ -102,19 +102,22 @@ form{
|
|||||||
}
|
}
|
||||||
|
|
||||||
#top {
|
#top {
|
||||||
|
font-family: "Autour One", serif; /* font-family: "Playwrite AU SA", serif; */
|
||||||
|
|
||||||
display: none; /* Hidden by default */
|
display: none; /* Hidden by default */
|
||||||
position: fixed; /* Fixed/sticky position */
|
position: fixed; /* Fixed/sticky position */
|
||||||
bottom: 20px; /* Place the button at the bottom of the page */
|
bottom: 12px; /* Place the button at the bottom of the page */
|
||||||
right: 30px; /* Place the button 30px from the right */
|
right: 10px; /* Place the button 30px from the right */
|
||||||
z-index: 99; /* Make sure it does not overlap */
|
z-index: 99; /* Make sure it does not overlap */
|
||||||
border: none; /* Remove borders */
|
border: none; /* Remove borders */
|
||||||
outline: none; /* Remove outline */
|
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 */
|
cursor: pointer; /* Add a mouse pointer on hover */
|
||||||
padding: 15px; /* Some padding */
|
padding: 15px; /* Some padding */
|
||||||
border-radius: 10px; /* Rounded corners */
|
border-radius: 10px; /* Rounded corners */
|
||||||
font-size: 18px; /* Increase font size */
|
font-size: 18px; /* Increase font size */
|
||||||
border:solid 1px #363636;
|
border:solid 1px #363636;
|
||||||
|
box-shadow: 3px 3px 3px #363636 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#top:hover {
|
#top:hover {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user