📜  如何创建单独的弹性框以将项目添加到框中 - Html 代码示例

📅  最后修改于: 2022-03-11 14:53:06.856000             🧑  作者: Mango

代码示例1
.container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.item {
  width: 32%;
  padding-bottom: 32%; /* Same as width, sets height */
  margin-bottom: 2%; /* (100-32*3)/2 */
  position: relative;
}