Grid Bootstrap 5: XXL

Contoh grid peralatan XXL

XSmall Small Medium Large Extra Large XXL
awalan kelas .col- .col-sm- .col-md- .col-lg- .col-xl- .col-xxl-
lebar layar <576px >=576px >=768px >=992px >=1200px >=1400px

Peralatan XXL ditandai dengan 1400 piksel dan di ataslebar layar

Contoh di bawah ini akan memproduksi 50%/50% pemecahan di peralatan menengah, besar dan super besar, serta 25%/75% pemecahan di peralatan XXL. Di peralatan kecil dan super kecil, ini akan otomatis menggabungkan (100%)

Example

<div class="container-fluid">
  <div class="row">
    <div class="col-md-6 col-xxl-3">
      <p>The World Wide Fund for Nature (WWF), founded on April 29, 1961, has a giant panda as its logo ...</p>
    </div>
    <div class="col-md-6 col-xxl-9">
      <p>In 1980, WWF officially came to China, invited by the Chinese government to carry out the protection work of giant pandas and their habitats ...</p>
    </div>
  </div>
</div>

Try It Yourself

Note:Make sure the total is always 12.

Only use XXL

In the following example, we only specify .col-xxl-6 class (without .col-md-* and / or .col-sm-*). This means that xxlarge devices will split 50%/50%. However, for extra-large, large, medium, small, and extra-small devices, it will be vertically stacked (100% width):

Example

<div class="container-fluid">
  <div class="row">
    <div class="col-xxl-6">
      <p>The World Wide Fund for Nature (WWF), founded on April 29, 1961, has a giant panda as its logo ...</p>
    </div>
    <div class="col-xxl-6">
      <p>In 1980, WWF officially came to China, invited by the Chinese government to carry out the protection work of giant pandas and their habitats ...</p>
    </div>
  </div>
</div>

Try It Yourself

Automatic Layout Columns

In Bootstrap 5, there is a simple way to create equal-width columns for all devices: just from .col-xxl-* Remove numbers and use only on col elements .col-xxl Class. Bootstrap will recognize how many columns there are, and each column will receive the same width.

If the screen sizeLess than 1400px, columns will be horizontally stacked:

<!-- Two columns: at extra-large and above devices are 50% width -->
<div class="row">
  <div class="col-xxl">1 of 2</div>
  <div class="col-xxl">2 of 2</div>
</div>
<!-- Four columns: at extra-large and above devices are 25% width -->
<div class="row">
  <div class="col-xxl">1 of 4</div>
  <div class="col-xxl">2 of 4</div>
  <div class="col-xxl">3 of 4</div>
  <div class="col-xxl">4 of 4</div>
</div>

Try It Yourself