.caption_content {
display: flex;
flex-wrap: wrap;
margin-top: 24px;
background: #fff;
justify-content: start;
.caption_piece {
width: 50%-5px;
background-color: #d0eaff;
margin-top: 10px;
padding: 10px;
box-sizing: border-box;
&:nth-child(even) {
margin-left: 10px;
}
}
}
目标效果图
.caption_content {
display: flex;
flex-wrap: wrap;
margin-top: 24px;
background: #fff;
justify-content: start;
.caption_piece {
width: calc(50% - 5px) /*必须要空格 不然显示不正常*/;
background-color: #d0eaff;
margin-top: 10px;
padding: 10px;
box-sizing: border-box;
&:nth-child(even) {
margin-left: 10px;
}
}
}