FCC---CSS Flexbox: Use the flex-direction Property to Make a Column
The last two challenges used the flex-direction property set to row.
This property can also create a column by vertically stacking the children of a flex container.
Add the CSS property flex-direction to the #box-container element, and give it a value of column.
<style>
#box-container {
display: flex;
height: 500px;
flex-direction: column;
}
#box-1 {
background-color: dodgerblue;
width: 50%;
height: 50%;
}
#box-2 {
background-color: orangered;
width: 50%;
height: 50%;
}
</style>
<div id="box-container">
<div id="box-1"></div>
<div id="box-2"></div>
</div>
相关推荐
xiaohuli 2020-09-02
JackyCan 2020-08-13
Ladyseven 2020-07-25
尚衍亮 2020-02-17
GeolageWu 2019-12-17
yeluoxiaoxin 2019-12-08
bwshqh 2019-11-18
MaYangyang 2019-11-17
dongyang0 2019-11-03
JackyCan 2015-02-28
clschen 2011-08-05
MaYangyang 2019-07-01
MaYangyang 2019-07-01
dongyang0 2019-07-01
yeluoxiaoxin 2019-07-01
yongquanx 2019-07-01
武林半侠 2019-07-01
GeolageWu 2019-06-30