diff --git a/about.html b/about.html index 05eaf7a..d283cb2 100644 --- a/about.html +++ b/about.html @@ -396,12 +396,37 @@ /* border-radius: 10px; */ } - +/* scroll to top button */ +.go-top-btn { + position: fixed; + bottom: 35px; + right: 35px; + cursor: pointer; + border-radius: 50%; + height: 50px; + width: 50px; + background: #000000; + border: none; + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; + transition: background-color 0.3s, box-shadow 0.3s, transform 0.3s; +} +.go-top-btn:hover { + background-color: #000000; + box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.25); + transform: translateY(-2px); +} + +
@@ -819,6 +844,24 @@

Subscription Successful!

}); })(); + + //js for go top button in about page +const goTopBtn = document.querySelector('.go-top-btn'); + window.addEventListener('scroll', checkHeight) + function checkHeight() { + if (window.scrollY > 200) { + goTopBtn.style.display = "flex" + } else { + goTopBtn.style.display = "none" + } + } + goTopBtn.addEventListener('click', () => { + window.scrollTo({ + top: 0, + behavior: "smooth" + }) + }) +