Last active
November 26, 2019 20:42
Star
You must be signed in to star a gist
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"> | |
<title>flex direction test page</title> | |
<style> | |
* { | |
box-sizing: border-box; | |
} | |
div { | |
border: 1px solid gray; | |
margin: 5px; | |
} | |
.height { | |
height: 100vh; | |
} | |
.flex { | |
display: flex; | |
flex-direction: column; | |
} | |
.percent-elm { | |
height: 40%; | |
} | |
.pixel-elm { | |
height: 500px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="flex"> | |
<div> | |
<div> | |
<p>this elm include <strong>a</strong> 500px element</p> | |
<div class="pixel-elm"> | |
</div> | |
</div> | |
<div class="percent-elm"> | |
<button>Sample</button> | |
</div> | |
<div class="percent-elm"> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
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"> | |
<title>sample page</title> | |
<style> | |
div { | |
border: 1px solid black; | |
margin: 5px; | |
} | |
#pixel { | |
height: 100px; | |
} | |
#percent { | |
height: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="app"> | |
<div> | |
<div id="pixel"> | |
a | |
</div> | |
<div id="percent"> | |
a | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment