Skip to content

Instantly share code, notes, and snippets.

@nasitra
Created August 14, 2017 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nasitra/698fb6f618df7d1a64350ae67b72677c to your computer and use it in GitHub Desktop.
Save nasitra/698fb6f618df7d1a64350ae67b72677c to your computer and use it in GitHub Desktop.
Scrollable fixed content
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
body {
height: 2000px;
margin: 0;
}
.container {
position: fixed;
}
.content {
background-color: gray;
height: 100vh;
-webkit-transform: translateZ(0);
transform: translateZ(0);
width: 100vw;
}
</style>
</head>
<body>
<div class="container">
<div class="content"></div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment