grid实现不定项多少行样式不变形展示

这两个都可以实现

  display: grid;
        grid-row-gap: 24px;
        grid-column-gap: 24px;
        grid-template-columns: repeat(auto-fill, 24px);
        grid-template-rows: 24px;
  display: grid;
        grid-row-gap: 24px;
        grid-column-gap: 24px;
        grid-template-columns: repeat(auto-fit, 24px);
        grid-template-rows: 24px;

你可能感兴趣的:(javascript,前端,html)