Back to Top Test
by MegaScience
HTML
<div id="entirety">
<div id="backtotop" onclick="window.scrollTo(0, 0)">Back to Top?
</div>
</div>
CSS
html, body {
height: 150%;
margin: 0;
}
#entirety {
position: relative;
width: 100%;
height: 100%;
background: blue; /* For browsers that do not support gradients */
background: -webkit-linear-gradient(blue, cyan); /* For Safari 5.1 to 6.0 */
background: -o-linear-gradient(blue, yellow); /* For Opera 11.1 to 12.0 */
background: -moz-linear-gradient(blue, yellow); /* For Firefox 3.6 to 15 */
background: linear-gradient(blue, yellow); /* Standard syntax */
}
#backtotop {
border-radius: 20px;
margin: 5px;
padding: 5px;
border: 2px solid black;
background: red;
position: absolute;
right: 0;
bottom: 0;
}