【发布时间】:2019-03-24 17:07:02
【问题描述】:
我想知道如何在具有边距的列中的项目之间创建相等的距离。
我的代码如下所示:
.App {
display: flex;
height: 100%;
flex-direction: column;
align-items: center;
width: 100%;
}
.about {
text-align: center;
border: solid black 3px;
border-radius: 4px;
margin: 20px 0;
}
.userInput {
background-color: rgb(0, 255, 255);
border: solid black 4px;
border-radius: 4px;
margin: 20px 0;
}
.story {
background-color: rgb(100, 149, 237);
border: solid black 3px;
border-radius: 4px;
margin: 20px 0;
}
<div class='App'>
<div class='userInput'>
</div>
<div class='Story'>
</div>
<div class='About'>
</div>
</div>
我认为将其应用于 App 样式的“justify-content: space-around”会使 div 相对于页边距均匀分布在页面上。
【问题讨论】: