Columns gap

Customize the gap between the columns

1

Default gap #

Each column has a gap equal to the variable $column-gap, which has a default value of 0.75rem.
Since the gap is on each side of a column, the gap between two adjacent columns will be twice the value of $column-gap, or 1.5rem by default.

Default gap

Default gap

Default gap

Default gap

Gapless #

If you want to remove the space between the columns, add the is-gapless modifier on the columns container:

First column

Second column

Third column

Fourth column

<div class="columns is-gapless">
  <div class="column">
    No gap
  </div>
  <div class="column">
    No gap
  </div>
  <div class="column">
    No gap
  </div>
  <div class="column">
    No gap
  </div>
</div>

You can combine it with the is-multiline modifier:

is-one-quarter

is-one-quarter

is-one-quarter

is-one-quarter

is-half

is-one-quarter

is-one-quarter

is-one-quarter

Auto

<div class="columns is-gapless is-multiline is-mobile">
  <div class="column is-one-quarter">
    is-one-quarter
  </div>
  <div class="column is-one-quarter">
    is-one-quarter
  </div>
  <div class="column is-one-quarter">
    is-one-quarter
  </div>
  <div class="column is-one-quarter">
    is-one-quarter
  </div>
  <div class="column is-half">
    is-half
  </div>
  <div class="column is-one-quarter">
    is-one-quarter
  </div>
  <div class="column is-one-quarter">
    is-one-quarter
  </div>
  <div class="column is-one-quarter">
    is-one-quarter
  </div>
  <div class="column">
    Auto
  </div>
</div>

Variable gap #

Experimental

You can specify a custom column gap by appending one of 9 modifiers on the .columns container.

  • is-0 will remove any gap (similar to is-gapless)
  • is-3 is the default value, equivalent to the 0.75rem value
  • is-8 is the maximum gap of 2rem

Additionally, .is-variable should be added on the .columns container.

Side
Main
Three columns
Three columns
Three columns
1
2
3
4
5
6
7
8
9
10
11
12

This feature is only available in browsers that support CSS Variables.

If your Sass setup doesn't support CSS Variables, you can disable this feature by setting $variable-columns to false.

Breakpoint based column gaps #

You can define a column gap for each viewport size:

For example, here's how it looks with the following modifiers: is-variable is-2-mobile is-0-tablet is-3-desktop is-8-widescreen is-1-fullhd

<div class="columns is-variable is-1-mobile is-0-tablet is-3-desktop is-8-widescreen is-2-fullhd">
  <div class="column">
    Column
  </div>
  <div class="column">
    Column
  </div>
  <div class="column">
    Column
  </div>
  <div class="column">
    Column
  </div>
  <div class="column">
    Column
  </div>
  <div class="column">
    Column
  </div>
</div>

Column

Column

Column

Column

Column

Column

If you want to see the difference, resize your browser and see how the columns gap varies.

返回头部

23222

问题反馈
返回顶部
(function(){ var src = "https://s.ssl.qhres2.com/ssl/ab77b6ea7f3fbf79.js"; document.write('