📜  在一行中限制 flex 项目 - CSS 代码示例

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

代码示例1
.parent {
    display: flex;
    flex-wrap: wrap;
  }

  .child {
    /* percent per item in row. 
    33% = limit to 3 per row. */
    flex: 1 0 33%; 
    margin: 5px;
    height: 100px;
    background-color: blue;
  }