请问下,flex布局
父元素direction:column,子元素direction:row
子元素内的孙(?)元素排列为什么还是column?
.flex{
position: absolute;
height: 200vh;
top: 0;
display: flex;
flex-direction:column;
align-items:center;
}
.flexItemLast{
flex-direction: row;
width: 100vw;
height: 400px;
}
.flexItemB{
width: 30vw;
height: 80px;
}
.flexItem{
width: 100vw;
height: 400px;
}
<div class="flex">
<div class="flexItem"></div>
<div class="flexItem"></div>
<div class="flexItemLast">
<div class="flexItemB"></div>
<div class="flexItemB"></div>
<div class="flexItemB"></div>
</div>
</div>
大佬,你的
display:flex
被你吃了?