You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
426 B
Svelte
28 lines
426 B
Svelte
<style>
|
|
.up-arrow {
|
|
position: fixed;
|
|
width: 3vw;
|
|
height: 3vw;
|
|
top: 80vh;
|
|
right: 5vw;
|
|
cursor: pointer;
|
|
}
|
|
@media screen and (max-width: 800px) {
|
|
.up-arrow {
|
|
width: 70px;
|
|
height: 70px;
|
|
|
|
}
|
|
}
|
|
</style>
|
|
|
|
<script>
|
|
function scroll() {
|
|
window.scrollTo({top: 0, behavior: 'smooth'});
|
|
}
|
|
</script>
|
|
|
|
<div class="up-arrow" on:click="{scroll}">
|
|
<img src="/svg/up-arrow.svg" alt="up arrow">
|
|
</div>
|