【发布时间】:2018-05-03 11:12:57
【问题描述】:
我想知道为什么要使用justify-content
网格项占据整个空间
可用,而不是在网格中使用。
justify-content:
https://codepen.io/whisher/pen/JOpYdp
没有: https://codepen.io/whisher/pen/pdajjb
.wrapper {
background-color: red;
width: 500px;
height: 400px;
border: 2px solid #CCC;
display: grid;
grid-gap: 10px;
grid-template-columns: repeat(4, 80px);
grid-template-rows: repeat(3,100px);
align-content: space-around;
justify-content: space-between;
}
我的意思是我希望像使用 flex 一样
【问题讨论】:
标签: css flexbox grid-layout css-grid