Overflow

Use these shorthand utilities for quickly configuring how content overflows an element.

Overflow

Adjust the overflow property on the fly with four default values and classes. These classes are not responsive by default.

Overflow - 图1

  1. <div class="overflow-auto">...</div>
  2. <div class="overflow-hidden">...</div>
  3. <div class="overflow-visible">...</div>
  4. <div class="overflow-scroll">...</div>

overflow-x

Adjust the overflow-x property to affect the overflow of content horizontally.

Overflow - 图2

  1. <div class="overflow-x-auto">...</div>
  2. <div class="overflow-x-hidden">...</div>
  3. <div class="overflow-x-visible">...</div>
  4. <div class="overflow-x-scroll">...</div>

overflow-y

Adjust the overflow-y property to affect the overflow of content vertically.

Overflow - 图3

  1. <div class="overflow-y-auto">...</div>
  2. <div class="overflow-y-hidden">...</div>
  3. <div class="overflow-y-visible">...</div>
  4. <div class="overflow-y-scroll">...</div>

Using Sass variables, you may customize the overflow utilities by changing the $overflows variable in _variables.scss.

CSS

Sass utilities API

Overflow utilities are declared in our utilities API in scss/_utilities.scss. Learn how to use the utilities API.

scss/_utilities.scss

  1. "overflow": (
  2. property: overflow,
  3. values: auto hidden visible scroll,
  4. ),
  5. "overflow-x": (
  6. property: overflow-x,
  7. values: auto hidden visible scroll,
  8. ),
  9. "overflow-y": (
  10. property: overflow-y,
  11. values: auto hidden visible scroll,
  12. ),