Skip to content

Instantly share code, notes, and snippets.

@lucassmonn
Created April 6, 2020 14:24
Show Gist options
  • Save lucassmonn/c25ac58574fc9ebddf91fdb191b2531f to your computer and use it in GitHub Desktop.
Save lucassmonn/c25ac58574fc9ebddf91fdb191b2531f to your computer and use it in GitHub Desktop.
Exemplo de flexbox
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FlexBox</title>
</head>
<body>
<style>
.container {
height: 100vh;
width: 500px;
background-color: rgb(167, 167, 167);
display: flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: space-between;
align-items: stretch;
position: fixed;
}
.container div {
background: white;
}
.div1 {
align-self: flex-start;
display: flex;
width: 100%;
padding: 10px;
height: 50px;
}
.div2 {
display: flex;
width: 100%;
justify-content: center;
background-color: aqua !important;
overflow-y: auto;
}
.div2 ul li {
padding: 50px;
}
.div3 {
height: 50px;
display: flex;
width: 100%;
justify-content: center;
padding: 10px;
}
</style>
<div class="container">
<div class="div1">
a
</div>
<div class="div2">
<ul>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
<li>item</li>
</ul>
</div>
<div class="div3">
<button style="padding: 10px; background-color: black; color: white;">SHOW</button>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment