Design settings

Hex yellow: #ffc500

Scroll to top:

<style>#myBtn {
display: none;
position: fixed;
bottom: 10px;
left: 30px;
z-index: 99;
font-size: 20px;
border-style: solid;
border-color: red;
background-color: red;
color: white;
cursor: pointer;
padding: 10px;
border-radius: 20px;
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
}

#myBtn:hover {
background-color: white;
color: red;
}
</style>

<button onclick="topFunction()" id="myBtn" title="Go to top">Top</button>
<script>
// Get the button
let mybutton = document.getElementById("myBtn");

// When the user scrolls down 20px from the top of the document, show the button
window.onscroll = function() {scrollFunction()};

function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
mybutton.style.display = "block";
} else {
mybutton.style.display = "none";
}
}

// When the user clicks on the button, scroll to the top of the document
function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>