diff --git a/cone.png b/cone.png new file mode 100644 index 0000000..2feb859 Binary files /dev/null and b/cone.png differ diff --git a/index.html b/index.html index e8bf23a..716271f 100644 --- a/index.html +++ b/index.html @@ -305,6 +305,8 @@ +
+
@@ -1497,6 +1499,20 @@

Billing Address

opacity: 0; } } +.scroll-to-top { + position: fixed; + bottom: 20px; /* Distance from the bottom of the page */ + right: 40px; /* Distance from the right of the page */ + background-color: transparent; /* Transparent background */ + border: none; /* Remove border */ + cursor: pointer; /* Change cursor to pointer */ + z-index: 100; /* Ensure it’s above other content */ +} + +.scroll-to-top img { + width: 60px; /* Adjust size of the cone image */ + height: auto; /* Maintain aspect ratio */ +} + diff --git a/script2.js b/script2.js new file mode 100644 index 0000000..cdde1a8 --- /dev/null +++ b/script2.js @@ -0,0 +1,20 @@ +document.addEventListener("DOMContentLoaded", function() { + const scrollToTopButton = document.getElementById("scrollToTop"); + + // Show button when scrolling down + window.onscroll = function() { + if (document.body.scrollTop > 200 || document.documentElement.scrollTop > 200) { + scrollToTopButton.style.display = "block"; + } else { + scrollToTopButton.style.display = "none"; + } + }; + + // Scroll to top functionality + scrollToTopButton.addEventListener("click", function() { + window.scrollTo({ + top: 0, + behavior: "smooth" // Smooth scrolling + }); + }); +}); \ No newline at end of file