css 流式布局

html 复制代码
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
    <style>
      .box {
        width: 200px;
        height: 150px;
        background-color: black;
        display: flex;
        flex-flow: row wrap;
        align-content: flex-start;
      }

      .point {
        box-sizing: border-box;
        background-color: white;
        flex: 0 0 25%;
        height: 50px;
        border: 1px solid red;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <div class="point"></div>
      <div class="point"></div>
      <div class="point"></div>
      <div class="point"></div>
      <div class="point"></div>
      <div class="point"></div>
      <div class="point"></div>
      <div class="point"></div>
    </div>
  </body>
</html>
相关推荐
fengci.16 小时前
CTF+随机困难题目
android·开发语言·前端·学习·php
liulilittle16 小时前
LLAMA-CLI 运行千问3.6(R9-7945HX+64G+RTX40608G)
java·前端·llama
Cyber4K16 小时前
【Python专项】进阶语法-日志分类与分析(2)
开发语言·前端·python
匀泪16 小时前
云原生(Kubernetes存储)
前端·chrome
kyriewen17 小时前
你等的Babel编译,够喝三杯咖啡了——用Rust重写的SWC,只需眨个眼
前端·javascript·rust
搬砖码17 小时前
同源多标签页通信 4 种方案,从入门到生产环境
前端·面试
张元清17 小时前
SSR 状态管理陷阱:defineStore vs defineContextStore
前端·javascript·面试
donecoding17 小时前
nrm、corepack、npm registry 三者的爱恨情仇
前端·node.js·前端工程化
小gaigagi17 小时前
从吉客云·奇门到MySQL的完整数据流
前端