wc-scroll-button
Version:
A web-component for quickly locating to the top or bottom of a page
45 lines (36 loc) • 976 B
HTML
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>wc-scroll-button</title>
<style>
.title,
.footer {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
<div class="title" style="height: 40vh;">
<h2>A scroll-button web-component</h1>
<h2>is on the right</h2>
<h2>of current webPage.</h2>
</div>
<div class="footer" style="position: fixed; width: 100vw; bottom: 1vh;">
<div>
Repository: <a href="https://github.com/Brannua/wc-scroll-button">wc-scroll-button</a>
</div>
<div>
© 2022 <a href="https://github.com/brannua">lpj</a>
</div>
</div>
<div style="height: 2000px;"></div>
<wc-scroll-button/>
<script src="./index.js" type="module"></script>
</body>
</html>