引导图像网格带有3张图像

发布于 2025-02-08 18:43:40 字数 225 浏览 2 评论 0原文

我仍将头缠绕在Bootstrap的网格系统上,我想设置一个由三个图像组成的照片网格,并使用此布局。我该怎么做?

I'm still wrapping my head around bootstrap's grid system, and I'd like to set up a photo grid consisting of three images, with this layout. How would I go about it?

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

罗罗贝儿 2025-02-15 18:43:40

这是网格系统的示例。您需要创建一行以保存所有部分。然后在行内,创建2列,左右。在右列上,创建2行。

因此,结构应该是这样的:

- row
    - column
    - column
        - row
        - row

<html>
  <head>
        <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
  </head>
  <body>
    <div class="container">
      <div class="row">
        <div class="col" style="padding:100px; background:red;">
          1
        </div>
        <div class="col">
          <div class="row" style="padding:100px; background:blue;">
            2
          </div>
          <div class="row" style="padding:100px; background:gray;">
            3
          </div>
        </div>
      </div>
    </div>
  </body>
</html>

Here is an example of the grid system. You need to create a row to hold all of the sections. Then inside the row, create 2 columns, left and right. On the right column, create 2 rows.

So the structure should be like this:

- row
    - column
    - column
        - row
        - row

<html>
  <head>
        <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
  </head>
  <body>
    <div class="container">
      <div class="row">
        <div class="col" style="padding:100px; background:red;">
          1
        </div>
        <div class="col">
          <div class="row" style="padding:100px; background:blue;">
            2
          </div>
          <div class="row" style="padding:100px; background:gray;">
            3
          </div>
        </div>
      </div>
    </div>
  </body>
</html>

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文