在Bootstrap中,是否可以将一行堆叠在相应的列下方?

huangapple go评论64阅读模式
英文:

Is it possible to stack a row below respective column in bootstrap?

问题

你好,我被卡在这个问题上。我有2行和4列(每行col-md-8和col md-4)。
结构如下(还附有屏幕截图和代码):

在容器内

 第1行列1(md-8)      第1行列2(md-4) [手风琴]
 第2行列1(md-8)      第2行列2(md-4)

第1行的列2是手风琴,当它展开时,它会带走整个第2行,但我希望它只占用下面的第2行列2。

查看附图以更好地理解:
R2C1的空间已经大于R2C2
在Bootstrap中,是否可以将一行堆叠在相应的列下方?
当手风琴展开时,与R2C2相比,R2C1获得了太多额外的空间
在Bootstrap中,是否可以将一行堆叠在相应的列下方?

我是不是漏了什么或者怎样修复这个问题?谢谢。

这是代码演示:
https://stackblitz.com/edit/bootstrap-5-q5cctv?file=src%2Findex.html

<!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>
  <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
</head>
<body>
    <div class="container">
        <div class="row">
            <div class="col-md-8">
                <div class="mt-4 p-5 bg-white rounded-3">
                    <div class="row">
                        <div class="col-md-12">
                            <span class="fw-1">第1行列1</span>
                        </div>
                    </div>
                    <hr class="my-4">

                    <div class="row">
                        <div class="col-md-12">
                            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus eos, enim quibusdam nemo tempore modi ducimus eveniet similique, voluptatibus quas totam suscipit eius error accusantium veritatis velit, quis reprehenderit unde.</p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-md-4">
                <div class="mt-4 p-5 bg-white rounded-3">
                    <div class="row">
                        <div class="col-md-3">
                            <span>第1行列2</span>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-12">
                            <div class="accordion accordion-flush" id="accordionFlushExample">
                                <div class="accordion-item">
                                    <h2 class="accordion-header" id="flush-headingOne">
                                        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseOne" aria-expanded="false" aria-controls="flush-collapseOne">
                                            手风琴项目#1
                                        </button>
                                    </h2>
                                    <div id="flush-collapseOne" class="accordion-collapse collapse" aria-labelledby="flush-headingOne" data-bs-parent="#accordionFlushExample">
                                        <div class="accordion-body">照片编辑.</div>
                                    </div>
                                </div>
                                <div class="accordion-item">
                                    <h2 class="accordion-header" id="flush-headingTwo">
                                        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseTwo" aria-expanded="false" aria-controls="flush-collapseTwo">
                                            手风琴项目#2
                                        </button>
                                    </h2>
                                    <div id="flush-collapseTwo" class="accordion-collapse collapse" aria-labelledby="flush-headingTwo" data-bs-parent="#accordionFlushExample">
                                        <div class="accordion-body">用于演示<code>.accordion-flush</code>类的占位内容。这是第二个项目的手风琴主体。让我们想象这里填满了一些实际内容。</div>
                                    </div>
                                </div>
                                <div class="accordion-item">
                                    <h2 class="accordion-header" id="flush-headingThree">
                                        <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapseThree" aria-expanded="false" aria-controls="flush-collapseThree">
                                            手风琴项目#3
                                        </button>
                                    </h2>
                                    <div id="flush-collapseThree" class="accordion-collapse collapse" aria-labelledby="flush-headingThree" data-bs-parent="#accordionFlushExample">
                                        <div class="accordion-body">用于演示<code>.accordion-flush</code>类的占位内容。这是第三个项目的手风琴主体。在内容方面没有更多激动人心的事情,但至少乍一看,填充了一些空间,使其看起来更像是在现实应用程序中的外观。</div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-8">
                <div class="mt-4 p-5 bg-white rounded-3">
                    <div class="row">
                        <div class="col-md-12">
                            <span class="fw-1">第2行列1</span>
                        </div>
                    </div>
                    <hr class="my-4">
                    <div class="row">
                        <div class="col-md-12">
                            <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus eos, enim quibusdam nemo tempore modi ducimus eveniet similique, voluptatibus quas totam suscipit eius error accusantium veritatis velit, quis reprehenderit unde.</p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col

<details>
<summary>英文:</summary>

Hello i am stuck in this problem. I have 2 Rows and 4 Columns ( col-md-8 &amp; col md-4 in each row). 
Structure is like below (also attached screenshot and code):

 Inside container

     Row 1 Column 1 (md-8)      Row 1 Column 2 (md-4) [Accordion]
     Row 2 Column 1 (md-8)      Row 2 Column 2 (md-4)

The Column 2 of Row 1 is accordion and when it is expanded it takes whole row 2 with it but i want it to take just column below it which is Row 2 Column 2

See the attached images to have a better understanding:
R2C1 has already space greater than R2C2
[![enter image description here][1]][1]
When accordion is expanded R2C1 gets too much extra space as compared to R2C2
[![enter image description here][2]][2]

Is there any thing i am missing or fix this? Thank you.

Here is the code demo
https://stackblitz.com/edit/bootstrap-5-q5cctv?file=src%2Findex.html

  [1]: https://i.stack.imgur.com/dwuWK.png
  [2]: https://i.stack.imgur.com/ghBte.png

Code:

    &lt;!DOCTYPE html&gt;
    &lt;html lang=&quot;en&quot;&gt;
    &lt;head&gt;
        &lt;meta charset=&quot;UTF-8&quot;&gt;
        &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
        &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
        &lt;title&gt;Document&lt;/title&gt;
      &lt;!-- Bootstrap CSS --&gt;
        &lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;
            integrity=&quot;sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD&quot; crossorigin=&quot;anonymous&quot;&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;div class=&quot;container&quot;&gt;
            &lt;div class=&quot;row&quot;&gt;
                &lt;div class=&quot;col-md-8&quot;&gt;
                    &lt;div class=&quot;mt-4 p-5 bg-white rounded-3&quot;&gt;
                        &lt;div class=&quot;row&quot;&gt;
                            &lt;div class=&quot;col-md-12&quot;&gt;
                                &lt;span class=&quot;fw-1&quot;&gt;Row 1 Column 1&lt;/span&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;hr class=&quot;my-4&quot;&gt;
    
                        &lt;div class=&quot;row&quot;&gt;
                            &lt;div class=&quot;col-md-12&quot;&gt;
                                &lt;p&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus eos, enim quibusdam nemo tempore modi ducimus eveniet similique, voluptatibus quas totam suscipit eius error accusantium veritatis velit, quis reprehenderit unde.&lt;/p&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
    
    
    
                    &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class=&quot;col-md-4&quot;&gt;
                    &lt;div class=&quot;mt-4 p-5 bg-white rounded-3&quot;&gt;
                        &lt;div class=&quot;row&quot;&gt;
                            &lt;div class=&quot;col-md-3&quot;&gt;
    
                                &lt;span&gt;R1 C2&lt;/span&gt;
    
    
                                &lt;!-- &lt;i class=&quot;bi bi-printer-fill&quot;&gt; bi bi-envelope-at-fill &lt;/i&gt; --&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;div class=&quot;row&quot;&gt;
                            &lt;div class=&quot;col-md-12&quot;&gt;
                                &lt;div class=&quot;accordion accordion-flush&quot; id=&quot;accordionFlushExample&quot;&gt;
                                    &lt;div class=&quot;accordion-item&quot;&gt;
                                        &lt;h2 class=&quot;accordion-header&quot; id=&quot;flush-headingOne&quot;&gt;
                                            &lt;button class=&quot;accordion-button collapsed&quot; type=&quot;button&quot;
                                                data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#flush-collapseOne&quot;
                                                aria-expanded=&quot;false&quot; aria-controls=&quot;flush-collapseOne&quot;&gt;
                                                Accordion Item #1
                                            &lt;/button&gt;
                                        &lt;/h2&gt;
                                        &lt;div id=&quot;flush-collapseOne&quot; class=&quot;accordion-collapse collapse&quot;
                                            aria-labelledby=&quot;flush-headingOne&quot; data-bs-parent=&quot;#accordionFlushExample&quot;&gt;
                                            &lt;div class=&quot;accordion-body&quot;&gt;Photo Editing,.&lt;/div&gt;
                                        &lt;/div&gt;
                                    &lt;/div&gt;
                                    &lt;div class=&quot;accordion-item&quot;&gt;
                                        &lt;h2 class=&quot;accordion-header&quot; id=&quot;flush-headingTwo&quot;&gt;
                                            &lt;button class=&quot;accordion-button collapsed&quot; type=&quot;button&quot;
                                                data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#flush-collapseTwo&quot;
                                                aria-expanded=&quot;false&quot; aria-controls=&quot;flush-collapseTwo&quot;&gt;
                                                Accordion Item #2
                                            &lt;/button&gt;
                                        &lt;/h2&gt;
                                        &lt;div id=&quot;flush-collapseTwo&quot; class=&quot;accordion-collapse collapse&quot;
                                            aria-labelledby=&quot;flush-headingTwo&quot; data-bs-parent=&quot;#accordionFlushExample&quot;&gt;
                                            &lt;div class=&quot;accordion-body&quot;&gt;Placeholder content for this accordion, which is
                                                intended to demonstrate the &lt;code&gt;.accordion-flush&lt;/code&gt; class. This is the
                                                second item&#39;s accordion body. Let&#39;s imagine this being filled with some
                                                actual content.&lt;/div&gt;
                                        &lt;/div&gt;
                                    &lt;/div&gt;
                                    &lt;div class=&quot;accordion-item&quot;&gt;
                                        &lt;h2 class=&quot;accordion-header&quot; id=&quot;flush-headingThree&quot;&gt;
                                            &lt;button class=&quot;accordion-button collapsed&quot; type=&quot;button&quot;
                                                data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#flush-collapseThree&quot;
                                                aria-expanded=&quot;false&quot; aria-controls=&quot;flush-collapseThree&quot;&gt;
                                                Accordion Item #3
                                            &lt;/button&gt;
                                        &lt;/h2&gt;
                                        &lt;div id=&quot;flush-collapseThree&quot; class=&quot;accordion-collapse collapse&quot;
                                            aria-labelledby=&quot;flush-headingThree&quot; data-bs-parent=&quot;#accordionFlushExample&quot;&gt;
                                            &lt;div class=&quot;accordion-body&quot;&gt;Placeholder content for this accordion, which is
                                                intended to demonstrate the &lt;code&gt;.accordion-flush&lt;/code&gt; class. This is the
                                                third item&#39;s accordion body. Nothing more exciting happening here in terms
                                                of content, but just filling up the space to make it look, at least at first
                                                glance, a bit more representative of how this would look in a real-world
                                                application.&lt;/div&gt;
                                        &lt;/div&gt;
                                    &lt;/div&gt;
                                &lt;/div&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
                        
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;row&quot;&gt;
                &lt;div class=&quot;col-md-8&quot;&gt;
                    &lt;div class=&quot;mt-4 p-5 bg-white rounded-3&quot;&gt;
                        &lt;div class=&quot;row&quot;&gt;
                            &lt;div class=&quot;col-md-12&quot;&gt;
                                &lt;span class=&quot;fw-1&quot;&gt;Row 2 Column 1&lt;/span&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
    
                        &lt;hr class=&quot;my-4&quot;&gt;
    
                        &lt;div class=&quot;row&quot;&gt;
                            &lt;div class=&quot;col-md-12&quot;&gt;
                                &lt;p&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus eos, enim quibusdam nemo tempore modi ducimus eveniet similique, voluptatibus quas totam suscipit eius error accusantium veritatis velit, quis reprehenderit unde.&lt;/p&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
    
    
                            
    
                    &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class=&quot;col-md-4&quot;&gt;
                    &lt;div class=&quot;mt-4 p-5 bg-white rounded-3&quot;&gt;
                        &lt;div class=&quot;row&quot;&gt;
                            &lt;div class=&quot;col-md-3&quot;&gt;
    
                                &lt;span&gt;R2 C2&lt;/span&gt;
    
    
                                
                            &lt;/div&gt;
                        &lt;/div&gt;
                        &lt;hr class=&quot;my-4&quot;&gt;
    
                        &lt;div class=&quot;row&quot;&gt;
                            &lt;div class=&quot;col-md-12&quot;&gt;
                                &lt;p&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus eos, enim quibusdam nemo tempore modi ducimus eveniet similique, voluptatibus quas totam suscipit eius error accusantium veritatis velit, quis reprehenderit unde.&lt;/p&gt;
                            &lt;/div&gt;
                        &lt;/div&gt;
    
    
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
    
    
            &lt;footer class=&quot;pt-3 mt-4 text-muted border-top&quot;&gt;
                &#169; 2023
            &lt;/footer&gt;
        &lt;/div&gt;
      &lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js&quot;
            integrity=&quot;sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN&quot;
            crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
        &lt;script src=&quot;https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js&quot;
            integrity=&quot;sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3&quot;
            crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
        &lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.min.js&quot;
            integrity=&quot;sha384-mQ93GR66B00ZXjt0YO5KlohRA5SY2XofN4zfuZxLkoj1gXtW8ANNCe9d5Y3eG5eD&quot;
            crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
    &lt;/body&gt;
    &lt;/html&gt;

</details>


# 答案1
**得分**: 1

如果您不希望手风琴显示后,第二行的内容被推下来,您不应该将它们放在不同的行上。在容器内,您可以使用以下结构:

```html
<div class="row">
  <div class="col-8">
    <div>这里放一些内容</div>
    <div>这里放一些内容</div>
  </div>
  <div class="col-4">
    <div>这里放一些内容</div>
    <div>这里放一些内容</div>
  </div>
</div>

请注意,我删除了像这样的结构:

<div class="row">
  <div class="col-12">
    这里放一些内容
  </div>
</div>

因为它们在这里是不必要的,您应该明智地使用 flexbox。

下面是代码片段,您可以将其完整运行。

<!-- 开始代码片段:js 隐藏:false 控制台:true Babel:false -->

<!-- 语言:lang-html -->
<!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>文档</title>
  <!-- Bootstrap CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
</head>
<body>
  <div class="container">
    <div class="row">
      <div class="col-md-8">
        <div class="mt-4 p-5 bg-white rounded-3">
          <span class="fw-1">第1行第1列</span>
          <hr class="my-4">
          <p> Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus eos, enim quibusdam nemo tempore modi ducimus eveniet similique, voluptatibus quas totam suscipit eius error accusantium veritatis velit, quis reprehenderit unde.</p>
        </div>
        <div class="mt-4 p-5 bg-white rounded-3">
          <span class="fw-1">第2行第1列</span>
          <hr class="my-4">
          <p> Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus eos, enim quibusdam nemo tempore modi ducimus eveniet similique, voluptatibus quas totam suscipit eius error accusantium veritatis velit, quis reprehenderit unde.</p>
        </div>
      </div>
      <div class="col-md-4">
        <div class="mt-4 p-5 bg-white rounded-3">
          R1 C2
          <div class="accordion accordion-flush" id="accordionFlushExample">
            <div class="accordion-item">
              <h2 class="accordion-header" id="flush-headingOne">
                <button class="accordion-button collapsed" type="button"
                        data-bs-toggle="collapse" data-bs-target="#flush-collapseOne"
                        aria-expanded="false" aria-controls="flush-collapseOne">
                  手风琴项1
                </button>
              </h2>
              <div id="flush-collapseOne" class="accordion-collapse collapse"
                   aria-labelledby="flush-headingOne" data-bs-parent="#accordionFlushExample">
                <div class="accordion-body"> 图片编辑。 </div>
              </div>
            </div>
            <div class="accordion-item">
              <h2 class="accordion-header" id="flush-headingTwo">
                <button class="accordion-button collapsed" type="button"
                        data-bs-toggle="collapse" data-bs-target="#flush-collapseTwo"
                        aria-expanded="false" aria-controls="flush-collapseTwo">
                  手风琴项2
                </button>
              </h2>
              <div id="flush-collapseTwo" class="accordion-collapse collapse"
                   aria-labelledby="flush-headingTwo" data-bs-parent="#accordionFlushExample">
                <div class="accordion-body">
                  为此手风琴添加的占位内容,旨在演示`.accordion-flush`类。这是第二个项目的手风琴主体。让我们想象它装满了一些实际内容。
                </div>
              </div>
            </div>
            <div class="accordion-item">
              <h2 class="accordion-header" id="flush-headingThree">
                <button class="accordion-button collapsed" type="button"
                        data-bs-toggle="collapse" data-bs-target="#flush-collapseThree"
                        aria-expanded="false" aria-controls="flush-collapseThree">
                  手风琴项3
                </button>
              </h2>
              <div id="flush-collapseThree" class="accordion-collapse collapse"
                   aria-labelledby="flush-headingThree" data-bs-parent="#accordionFlushExample">
                <div class="accordion-body">
                  为此手风琴添加的占位内容,旨在演示`.accordion-flush`类。这是第三个项目的手风琴主体。至少乍一看,内容方面没有更多的激动人心的事情,但只是填充空间,使它看起来至少在第一眼看上去更像是真实世界应用程序中的样子。
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="mt-4 p-5 bg-white rounded-3">
          R2 C2
          <hr class="my-4">
          <p> Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus eos, enim quibusdam nemo tempore modi ducimus eveniet similique, voluptatibus quas totam suscipit eius error accusantium veritatis velit, quis reprehenderit unde.</p>
        </div>
      </div>
    </div>
    <footer class="pt-3 mt-4 text-muted border-top">
      © 2023
    </footer>
  </div>
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
          integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
          crossorigin="anonymous"></

<details>
<summary>英文:</summary>

If you don&#39;t want the content in second row pushed down after the accordion show, you shouldn&#39;t put them on different rows.
Inside container you can use structure like this:

    &lt;div class&quot;row&quot;&gt;
      &lt;div class=&quot;col-8&quot;&gt;
        &lt;div&gt;Some content here&lt;/div&gt;
        &lt;div&gt;Some content here&lt;/div&gt;
      &lt;/div&gt;
      &lt;div class=&quot;col-4&quot;&gt;
        &lt;div&gt;Some content here&lt;/div&gt;
        &lt;div&gt;Some content here&lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
Please note that I removed structures like this: 

    &lt;div class=&quot;row&quot;&gt;
      &lt;div class=&quot;col-12&quot;&gt;
        Some content here
      &lt;/div&gt;
    &lt;/div&gt;

because they are not needed here and you should use flexbox wisely.

Code snippet below, you can run it full page.
&lt;!-- begin snippet: js hide: false console: true babel: false --&gt;

&lt;!-- language: lang-html --&gt;

    &lt;!DOCTYPE html&gt;
    &lt;html lang=&quot;en&quot;&gt;
    &lt;head&gt;
      &lt;meta charset=&quot;UTF-8&quot;&gt;
      &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
      &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
      &lt;title&gt;Document&lt;/title&gt;
      &lt;!-- Bootstrap CSS --&gt;
      &lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;
            integrity=&quot;sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD&quot; crossorigin=&quot;anonymous&quot;&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div class=&quot;container&quot;&gt;
        &lt;div class=&quot;row&quot;&gt;
          &lt;div class=&quot;col-md-8&quot;&gt;
            &lt;div class=&quot;mt-4 p-5 bg-white rounded-3&quot;&gt;
              &lt;span class=&quot;fw-1&quot;&gt;Row 1 Column 1&lt;/span&gt;
              &lt;hr class=&quot;my-4&quot;&gt;
              &lt;p&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus eos, enim quibusdam nemo tempore modi ducimus eveniet similique, voluptatibus quas totam suscipit eius error accusantium veritatis velit, quis reprehenderit unde.&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class=&quot;mt-4 p-5 bg-white rounded-3&quot;&gt;
              &lt;span class=&quot;fw-1&quot;&gt;Row 2 Column 1&lt;/span&gt;
              &lt;hr class=&quot;my-4&quot;&gt;
              &lt;p&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus eos, enim quibusdam nemo tempore modi ducimus eveniet similique, voluptatibus quas totam suscipit eius error accusantium veritatis velit, quis reprehenderit unde.&lt;/p&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class=&quot;col-md-4&quot;&gt;
            &lt;div class=&quot;mt-4 p-5 bg-white rounded-3&quot;&gt;
              R1 C2
              &lt;div class=&quot;accordion accordion-flush&quot; id=&quot;accordionFlushExample&quot;&gt;
                &lt;div class=&quot;accordion-item&quot;&gt;
                  &lt;h2 class=&quot;accordion-header&quot; id=&quot;flush-headingOne&quot;&gt;
                    &lt;button class=&quot;accordion-button collapsed&quot; type=&quot;button&quot;
                            data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#flush-collapseOne&quot;
                            aria-expanded=&quot;false&quot; aria-controls=&quot;flush-collapseOne&quot;&gt;
                      Accordion Item #1
                    &lt;/button&gt;
                  &lt;/h2&gt;
                  &lt;div id=&quot;flush-collapseOne&quot; class=&quot;accordion-collapse collapse&quot;
                       aria-labelledby=&quot;flush-headingOne&quot; data-bs-parent=&quot;#accordionFlushExample&quot;&gt;
                    &lt;div class=&quot;accordion-body&quot;&gt;Photo Editing,.&lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class=&quot;accordion-item&quot;&gt;
                  &lt;h2 class=&quot;accordion-header&quot; id=&quot;flush-headingTwo&quot;&gt;
                    &lt;button class=&quot;accordion-button collapsed&quot; type=&quot;button&quot;
                            data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#flush-collapseTwo&quot;
                            aria-expanded=&quot;false&quot; aria-controls=&quot;flush-collapseTwo&quot;&gt;
                      Accordion Item #2
                    &lt;/button&gt;
                  &lt;/h2&gt;
                  &lt;div id=&quot;flush-collapseTwo&quot; class=&quot;accordion-collapse collapse&quot;
                       aria-labelledby=&quot;flush-headingTwo&quot; data-bs-parent=&quot;#accordionFlushExample&quot;&gt;
                    &lt;div class=&quot;accordion-body&quot;&gt;
                      Placeholder content for this accordion, which is
                      intended to demonstrate the &lt;code&gt;.accordion-flush&lt;/code&gt; class. This is the
                      second item&#39;s accordion body. Let&#39;s imagine this being filled with some
                      actual content.
                    &lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
                &lt;div class=&quot;accordion-item&quot;&gt;
                  &lt;h2 class=&quot;accordion-header&quot; id=&quot;flush-headingThree&quot;&gt;
                    &lt;button class=&quot;accordion-button collapsed&quot; type=&quot;button&quot;
                            data-bs-toggle=&quot;collapse&quot; data-bs-target=&quot;#flush-collapseThree&quot;
                            aria-expanded=&quot;false&quot; aria-controls=&quot;flush-collapseThree&quot;&gt;
                      Accordion Item #3
                    &lt;/button&gt;
                  &lt;/h2&gt;
                  &lt;div id=&quot;flush-collapseThree&quot; class=&quot;accordion-collapse collapse&quot;
                       aria-labelledby=&quot;flush-headingThree&quot; data-bs-parent=&quot;#accordionFlushExample&quot;&gt;
                    &lt;div class=&quot;accordion-body&quot;&gt;
                      Placeholder content for this accordion, which is
                      intended to demonstrate the &lt;code&gt;.accordion-flush&lt;/code&gt; class. This is the
                      third item&#39;s accordion body. Nothing more exciting happening here in terms
                      of content, but just filling up the space to make it look, at least at first
                      glance, a bit more representative of how this would look in a real-world
                      application.
                    &lt;/div&gt;
                  &lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;mt-4 p-5 bg-white rounded-3&quot;&gt;
              R2 C2
              &lt;hr class=&quot;my-4&quot;&gt;
              &lt;p&gt;Lorem ipsum dolor sit amet consectetur adipisicing elit. Possimus eos, enim quibusdam nemo tempore modi ducimus eveniet similique, voluptatibus quas totam suscipit eius error accusantium veritatis velit, quis reprehenderit unde.&lt;/p&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;footer class=&quot;pt-3 mt-4 text-muted border-top&quot;&gt;
          &#169; 2023
        &lt;/footer&gt;
      &lt;/div&gt;
      &lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js&quot;
              integrity=&quot;sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN&quot;
              crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js&quot;
              integrity=&quot;sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3&quot;
              crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
      &lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.min.js&quot;
              integrity=&quot;sha384-mQ93GR66B00ZXjt0YO5KlohRA5SY2XofN4zfuZxLkoj1gXtW8ANNCe9d5Y3eG5eD&quot;
              crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;
    &lt;/body&gt;
    &lt;/html&gt;

&lt;!-- end snippet --&gt;



</details>



huangapple
  • 本文由 发表于 2023年2月8日 20:15:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/75385654.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定