"How to make Bottom To Top Button In HTML"
Bootstrap 4.1.1 Snippet by nitesh575

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>How to make Bottom To Top Button In HTML</title> <!-- Bootstrap CSS --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"> <!-- Font Awesome --> <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet"> </head> <body> <div class="container mt-5"> <div class="row border-bottom border-dark"> <div class="col-lg-12"> <h2>How to make Bottom To Top Button In HTML</h2> </div> </div> </div> <section class="mrnu-first mb-5 mt-4"> <div class="container"> <div class="row"> <div class="col-lg-12"> <h4 class="my-3">The <a href="https://thethoughtoftheday.com/">bachelorette season 21 finale</a> guest list and latest news</h4> <p>The Bachelorette season 21 finale will feature Jenn Tran's final two suitors, <a href="https://thethoughtoftheday.com/celebrity/controversy-surrounding-marcus-shoberg-on-the-bachelorette">Marcus Shoberg</a> and <a href="https://thethoughtoftheday.com/celebrity/devin-strader-bachelorette-star-and-f1-freight-owner">Devin Strader</a>, meeting her family members to seek their approval. The episode will see Jenn introduce her chosen men to her loved ones as she makes her final decision.</p> <h4 class="my-3">Latest News on The Bachelorette Season 21 Finale</h4> <p>The season 21 finale is scheduled to air on Tuesday, September 3 at 8 p.m. ET on ABC. It will be a three-hour special, including the final episode and the "After the Final Rose" segment.</p> <p>In the end, Jonathan Johnson was sent home, leaving Marcus and Devin as Jenn's final two choices. The Men Tell All episode added another layer of drama to the season.</p> <p>The finale has been teased with a scene of Jenn telling one of the suitors that she can't allow him to propose, adding to the suspense. Whether the season will end with an engagement is yet to be determined.</p> <p><a href="https://thethoughtoftheday.com/informative/the-bachelor-jenn-tran-earnings-net-worth-career-insights">Jenn Tran</a> made history as the first Asian American lead in the franchise's 22-year history. Her journey has been a testament to authenticity and self-discovery</p> <h4 class="my-3">The finale has been kept tightly under wraps, with only a few hints and speculations from fans:</h4> <ul> <li>The finale will feature Jenn's final two suitors, Marcus and Devin, meeting her family members to seek their approval as she makes her final decision.</li> <li>A preview clip shows Jenn telling one of the finalists that she can't allow him to propose, adding suspense about whether the season will end with an engagement.</li> <li>Some fans speculate that Jenn may not choose either Marcus or Devin, leaving the season without an engaged couple. However, this is just speculation based on the teaser clip.</li> <li>The search results do not contain any confirmed spoilers about who Jenn will pick or if she will get engaged. The finale's outcome remains a closely guarded secret until it airs.</li> </ul> <h4 class="my-3">The bachelorette season 21 finale date time:</h4> <p>The Bachelorette Season 21 is scheduled to air on Tuesday, September 3, 2024, at 8 p.m. ET on ABC</p> </div> </div> </div> </section> <button class="btn-top" id="btnTop">⮝</button> <!-- Bootstrap JS --> <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" crossorigin="anonymous"></script> <!-- JavaScript to handle the "Back to Top" button functionality --> <script> // Get the button const btnTop = document.getElementById('btnTop'); // Show the button when the user scrolls down 20px from the top of the document window.onscroll = function () { if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { btnTop.style.display = "block"; } else { btnTop.style.display = "none"; } }; // Scroll to the top of the document when the button is clicked btnTop.onclick = function () { window.scrollTo({ top: 0, behavior: 'smooth' }); }; </script> </body> </html>
.btn-top { position: fixed; bottom: 70px; right: 50px; background: #36c0ff; border: none; width: 50px; height: 50px; border-radius: 50%; color: #fff; font-size: 29px; display: flex; align-items: center; justify-content: center; cursor: pointer; display: none; /* Initially hidden */ } .btn-top:hover { bottom: 72px; box-shadow: 0px 2px 2px -1px #000; } a{ text-decoration: none; color: #0c61cf; font-weight: bold; } P{ font-size: 18px; line-height: 30px; } ul li{ font-size: 18px; line-height: 30px; }

Related: See More


Questions / Comments: