CSS瀑布流

html

<div class="flex">
      <div class="l_flex">
        <div class="item"></div>
      </div>
      <div class="r_flex">
        <div class="item"></div>
      </div>
    </div>

css

      .flex {
        background-color: rgb(224, 224, 224);
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 12px 12px 0;
      }
      .flex .l_flex {
        display: flex;
        flex-direction: column;
        width: 48%;
      }
      .flex .r_flex {
        display: flex;
        flex-direction: column;
        width: 48%;
      }
      .flex .item {
        width: 100%;
        height: auto;
        border-radius: 10px;
        overflow: hidden;
        background-color: white;
        margin-bottom: 10px;
      }
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。