align-items 与 align-self
by li yanlong
HTML
<div id="flexbox">
<div class="one">1</div>
<div class="two">2</div>
</div>
CSS
#flexbox{
display: flex;
text-align: center;
height: 100px;
align-items: flex-start;
border: 1px solid #ddd;
}
.one {
color: #fff;
background: #353535;
width: 10%;
}
.two {
color: #fff;
width: 20%;
background: green;
align-self: center;
}