.div-container {
display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
.sub-div {
margin-left: auto; // 使子元素靠右按列排列
margin-right: 10px; // 控制子元素右外边距的距离
}
}
之前的效果:
修改之后的效果:
.div-container {
display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
.sub-div {
margin-left: auto; // 使子元素靠右按列排列
margin-right: 10px; // 控制子元素右外边距的距离
}
}
之前的效果:
修改之后的效果: