123456789101112131415161718192021222324252627282930313233 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>Document</title>
- <style>
- .container {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- }
- .box {
- flex-basis: calc(33.33% - 20px); /* 每个盒子的宽度 */
- margin-bottom: 20px; /* 垂直间距 */
- height: 100px;
- background-color: #f40;
- }
- </style>
- </head>
- <body>
- <div class="container">
- <div class="box">Box 1</div>
- <div class="box">Box 2</div>
- <div class="box">Box 3</div>
- <div class="box">Box 4</div>
- <div class="box">Box 5</div>
- <div class="box">Box 6</div>
- </div>
- </body>
- </html>
|