From fe48fc30faa7ed9501b0ce4ca5be997b4c8fc04d Mon Sep 17 00:00:00 2001 From: Meet Thakur <99238677+MeetThakur@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:39:40 +0530 Subject: [PATCH 1/2] added a scroll to top button (#154) --- assets/css/style.css | 20 ++++++++++++++++++++ index.html | 6 ++++++ scripts/index.js | 25 +++++++++++++++++++++---- 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index 4f5625e..d9031b4 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -8,6 +8,26 @@ scroll-behavior: smooth; } +/*scroll to top button*/ +#scrollToTopBtn { + display: none; + position: fixed; + bottom: 20px; + right: 30px; + z-index: 99; + border: none; + outline: none; + background-color: #555; + color: white; + cursor: pointer; + padding: 10px; + border-radius: 5px; + font-size: 12px; +} + +#scrollToTopBtn:hover { + background-color: #333; +} /* Menu Bar */ .menu-container { diff --git a/index.html b/index.html index 9ddbd6f..92cecad 100644 --- a/index.html +++ b/index.html @@ -31,6 +31,12 @@
+ + + +