Skip to content

Instantly share code, notes, and snippets.

@Willamin
Created February 12, 2018 21:35
Show Gist options
  • Save Willamin/4023e717ad9a154a16ad11c6bead04bb to your computer and use it in GitHub Desktop.
Save Willamin/4023e717ad9a154a16ad11c6bead04bb to your computer and use it in GitHub Desktop.
<head>
<style>
body {
margin: 0;
padding: 0;
}
.container {
width: 100vw;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
font-size: 60px;
font-family: sans-serif;
}
body {
overflow: hidden;
}
.top {
height: 100px;
background-color: blue;
width: 100%;
}
</style>
</head>
<body>
<div class="top"></div>
<div class="container" id="jump">
<div>
hello world
</div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
window.scroll(0, 100);
});
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment