Created
August 17, 2018 14:39
-
-
Save ToreJuloe/898794ded842bb185977bfd9b565e3af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<style> | |
body, html { | |
padding: 0; | |
margin: 0; | |
height: 100%; | |
width: 100%; | |
background-color: blueviolet; | |
font-family: sans-serif; | |
position: fixed; | |
overflow: hidden; | |
font-size: 16px; | |
-webkit-text-size-adjust: 100%; | |
} | |
#container { | |
display: flex; | |
flex-direction: column; | |
flex: 1 0 auto; | |
height: 100%; | |
width: 100%; | |
overflow: hidden; | |
} | |
#header { | |
background-color: blue; | |
height: 40px; | |
} | |
#content { | |
background-color: darkgray; | |
flex: 1; | |
overflow: hidden; | |
height: auto; | |
} | |
.scrollpanel { | |
overflow-x: hidden; | |
overflow-y: auto; | |
height: 100%; | |
-webkit-overflow-scrolling: touch; | |
} | |
#someid { | |
display: flex; | |
flex-direction: column; | |
align-items: stretch; | |
padding: 8px; | |
} | |
.someclass { | |
background-color: rgb(97, 97, 97); | |
flex: 1 0 auto; | |
} | |
p { | |
font-size: 14px; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="container"> | |
<div id="header"> | |
My awesome blog | |
</div> | |
<div id="content"> | |
<div class="scrollpanel"> | |
<div id="someid"> | |
<div class="someclass"><p>one</p></div> | |
<div class="someclass"><p>two</p></div> | |
<div class="someclass"><p>three</p></div> | |
<div class="someclass"><p>four</p></div> | |
<div class="someclass"><p>five</p></div> | |
<div class="someclass"><p>six</p></div> | |
<div class="someclass"><p>seven</p></div> | |
<div class="someclass"><p>seven</p></div> | |
<!-- <div class="someclass" style="transform: translate3d(0,0,0)">This breaks everything</div> --> | |
<div class="someclass"><p>nine</p></div> | |
<div class="someclass"><p>ten</p></div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
uncomment the
.someclass
to break