A Pen by liuxiaomingskm on CodePen.
Created
January 28, 2020 17:58
-
-
Save liuxiaomingskm/16deaeaf32b1c07513de36259b8610b7 to your computer and use it in GitHub Desktop.
Super Simple Flexbox Side Nav(练习了flex-direciton,justify-content等内容)
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="sidebar"> | |
<!-- This section shoudl be at the top--> | |
<div class="section1"> | |
<div class="item">Messages</div> | |
<div class="item">Friends</div> | |
<div class="item">User Profile</div> | |
</div> | |
<!-- This section should be at the botto --> | |
<div class="section2"> | |
<div class="item">Settings</div> | |
<div class="item">Questions?</div> | |
</div> | |
</div> |
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
@import url('https://fonts.googleapis.com/css?family=Raleway:200'); | |
body { | |
margin: 0; | |
background: #ecf0f1; | |
} | |
.sidebar { | |
height: 100vh; | |
width: 15vw; | |
font-family: raleway; | |
background: #34495e; | |
display:flex; | |
flex-direction:column; | |
justify-content:space-between; | |
border: 10px solid pink; | |
.item { | |
color: white; | |
font-size: 20px; | |
padding-left:15px; | |
} | |
.section1 { | |
/* display:flex; | |
flex-direction:column; */ | |
} | |
.section2 { | |
/* display:flex; | |
flex-direction:column; | |
*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment