Created
December 1, 2020 19:52
-
-
Save ghostdevv/9c01e27c344dc8147ed492bed65daf60 to your computer and use it in GitHub Desktop.
Flexbox corners
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
*, *::before, *::after { box-sizing: border-box; } | |
.flexbox-corners { | |
background-color: DarkCyan; | |
height: 100%; | |
display: flex; | |
flex-flow: row wrap; | |
justify-content: space-between; | |
} | |
.flexbox-corners > div { | |
flex: 0 1 50%; | |
height: -moz-fit-content; | |
height: fit-content; | |
display: flex; | |
flex-flow: row nowrap; | |
justify-content: flex-start; | |
} | |
.flexbox-corners > div > div { | |
background-color: gray; | |
padding: 16px 24px; | |
width: -moz-fit-content; | |
width: fit-content; | |
} | |
.flexbox-corners > div:nth-child(2) { | |
justify-content: flex-end; | |
} | |
.flexbox-corners > div:nth-child(3) { | |
align-self: flex-end; | |
} | |
.flexbox-corners > div:nth-child(4) { | |
align-self: flex-end; | |
justify-content: flex-end; | |
} |
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
<div class="flexbox-corners"> | |
<div> | |
<div> | |
<span>1</span> | |
</div> | |
</div> | |
<div> | |
<div> | |
<span>2</span> | |
</div> | |
</div> | |
<div> | |
<div> | |
<span>3</span> | |
</div> | |
</div> | |
<div> | |
<div> | |
<span>4</span> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment