Gutters

      Gutters are the padding between your columns, used to responsively space and align content in the Bootstrap grid system.

      How they work

      • Gutters are the gaps between column content, created by horizontal padding. We set padding-right and padding-left on each column, and use negative margin to offset that at the start and end of each row to align content.

      • Gutters start at 1.5rem (24px) wide. This allows us to match our grid to the padding and margin spacers scale.

      • Gutters can be responsively adjusted. Use breakpoint-specific gutter classes to modify horizontal gutters, vertical gutters, and all gutters.

      Horizontal gutters

      .gx-* classes can be used to control the horizontal gutter widths. The .container or .container-fluid parent may need to be adjusted if larger gutters are used too to avoid unwanted overflow, using a matching padding utility. For example, in the following example we’ve increased the padding with .px-4:

      Custom column padding
      Custom column padding
      <div class="container px-4">
      <div class="row gx-5">
      <div class="col">
       <div class="p-3 border bg-light">Custom column padding</div>
      </div>
      <div class="col">
        <div class="p-3 border bg-light">Custom column padding</div>
      </div>
      </div>
      </div>

      An alternative solution is to add a wrapper around the .row with the .overflow-hidden class:

      Custom column padding
      Custom column padding
      <div class="container overflow-hidden">
      <div class="row gx-5">
      <div class="col">
       <div class="p-3 border bg-light">Custom column padding</div>
      </div>
      <div class="col">
        <div class="p-3 border bg-light">Custom column padding</div>
      </div>
      </div>
      </div>

      Vertical gutters

      .gy-* classes can be used to control the vertical gutter widths. Like the horizontal gutters, the vertical gutters can cause some overflow below the .row at the end of a page. If this occurs, you add a wrapper around .row with the .overflow-hidden class:

      Custom column padding
      Custom column padding
      Custom column padding
      Custom column padding
      <div class="container overflow-hidden">
      <div class="row gy-5">
      <div class="col-6">
        <div class="p-3 border bg-light">Custom column padding</div>
      </div>
      <div class="col-6">
        <div class="p-3 border bg-light">Custom column padding</div>
      </div>
      <div class="col-6">
        <div class="p-3 border bg-light">Custom column padding</div>
      </div>
      <div class="col-6">
        <div class="p-3 border bg-light">Custom column padding</div>
      </div>
      </div>
      </div>

      Horizontal & vertical gutters

      .g-* classes can be used to control the horizontal gutter widths, for the following example we use a smaller gutter width, so there won’t be a need to add the .overflow-hidden wrapper class.

      Custom column padding
      Custom column padding
      Custom column padding
      Custom column padding
      <div class="container">
      <div class="row g-2">
      <div class="col-6">
        <div class="p-3 border bg-light">Custom column padding</div>
      </div>
      <div class="col-6">
        <div class="p-3 border bg-light">Custom column padding</div>
      </div>
      <div class="col-6">
        <div class="p-3 border bg-light">Custom column padding</div>
      </div>
      <div class="col-6">
        <div class="p-3 border bg-light">Custom column padding</div>
      </div>
      </div>
      </div>

      Row columns gutters

      Gutter classes can also be added to row columns. In the following example, we use responsive row columns and responsive gutter classes.

      Row column
      Row column
      Row column
      Row column
      Row column
      Row column
      Row column
      Row column
      Row column
      Row column
      <div class="container">
      <div class="row row-cols-2 row-cols-lg-5 g-2 g-lg-3">
      <div class="col">
        <div class="p-3 border bg-light">Row column</div>
      </div>
      <div class="col">
        <div class="p-3 border bg-light">Row column</div>
      </div>
      <div class="col">
        <div class="p-3 border bg-light">Row column</div>
      </div>
      <div class="col">
        <div class="p-3 border bg-light">Row column</div>
      </div>
      <div class="col">
        <div class="p-3 border bg-light">Row column</div>
      </div>
      <div class="col">
        <div class="p-3 border bg-light">Row column</div>
      </div>
      <div class="col">
        <div class="p-3 border bg-light">Row column</div>
      </div>
      <div class="col">
        <div class="p-3 border bg-light">Row column</div>
      </div>
      <div class="col">
        <div class="p-3 border bg-light">Row column</div>
      </div>
      <div class="col">
        <div class="p-3 border bg-light">Row column</div>
      </div>
      </div>
      </div>

      No gutters

      The gutters between columns in our predefined grid classes can be removed with .g-0. This removes the negative margins from .row and the horizontal padding from all immediate children columns.

      Need an edge-to-edge design? Drop the parent .container or .container-fluid.

      In practice, here’s how it looks. Note you can continue to use this with all other predefined grid classes (including column widths, responsive tiers, reorders, and more).

      .col-sm-6 .col-md-8
      .col-6 .col-md-4
      <div class="row g-0">
      <div class="col-sm-6 col-md-8">.col-sm-6 .col-md-8</div>
      <div class="col-6 col-md-4">.col-6 .col-md-4</div>
      </div>

      Change the gutters

      Classes are built from the $gutters Sass map which is inherited from the $spacers Sass map.

      $grid-gutter-width: 1.5rem;
      $gutters: (
      0: 0,
      1: $spacer * .25,
      2: $spacer * .5,
      3: $spacer,
      4: $spacer * 1.5,
      5: $spacer * 3,
      );
      
      返回頂部
      主站蜘蛛池模板: 亚欧在线精品免费观看一区| 亚洲国产一区国产亚洲| 久久中文字幕无码一区二区| 狠狠色婷婷久久一区二区| 亚洲日韩一区二区一无码| 日本一区二区不卡视频| 人妻无码一区二区视频| 国产精品免费综合一区视频| 中文字幕无码不卡一区二区三区| 亚洲一区二区三区深夜天堂 | 日本激情一区二区三区| 东京热无码av一区二区| 色综合一区二区三区| 国产一区二区久久久| 亚洲一区二区久久| 亚洲av无码不卡一区二区三区| 狠狠爱无码一区二区三区| 国产精品久久久久久一区二区三区| 亚欧色一区W666天堂| 中文日韩字幕一区在线观看| 蜜桃视频一区二区三区| 国产一区二区三区免费在线观看| 国产伦精品一区二区三区免.费| 国产一区二区三区露脸| 日本精品3d动漫一区二区| 加勒比无码一区二区三区| 国产麻豆精品一区二区三区| 欧美日韩国产免费一区二区三区| 国产一区二区精品久久91| 国内精品一区二区三区最新| 国精产品一区一区三区有限公司| 夜夜爽一区二区三区精品| 国产精品毛片一区二区| 中文字幕在线精品视频入口一区| 一区二区三区四区视频| 精产国品一区二区三产区| 国产亚洲综合精品一区二区三区| 一区二区三区在线免费观看视频| 国产精品特级毛片一区二区三区| 91视频一区二区三区| 午夜性色一区二区三区免费不卡视频|