flex - 四个元素平均分布
作者:
一沭丶 | 来源:发表于
2018-10-31 10:05 被阅读116次<div class="demo">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
.demo{
width: 250px;
height: 300px;
display: flex;
flex-wrap: wrap;
align-content: flex-center;
align-items: center;
justify-content: space-around;
border: 1px solid blue;
}
.item{
/* flex: 0 0 40%; */
width: 100px;
height: 80px;
box-sizing: border-box;
border: 1px solid red
}
![](https://img.haomeiwen.com/i2348301/19b18b4b524206f5.png)
image.png
示例地址
本文标题:flex - 四个元素平均分布
本文链接:https://www.haomeiwen.com/subject/qrvotqtx.html
网友评论