溢出(Overflow)

使用这些速记的通用类别快速配置内容溢出元素的方式。

On this page

使用四个预设的值与类别,即时的调整overflow属性。预设情况下这些类别并非响应式的。

This is an example of using .overflow-auto on an element with set width and height dimensions. By design, this content will vertically scroll.
This is an example of using .overflow-hidden on an element with set width and height dimensions.
This is an example of using .overflow-visible on an element with set width and height dimensions.
This is an example of using .overflow-scroll on an element with set width and height dimensions.
<div class="overflow-auto">...</div>
<div class="overflow-hidden">...</div>
<div class="overflow-visible">...</div>
<div class="overflow-scroll">...</div>

使用Sass变量,你可以透过更改_variables.scss中的$overflows变量以自定义溢出通用类别。

Sass

Utilities API

Overflow utilities are declared in our utilities API in scss/_utilities.scss.

    "overflow": (
property: overflow,
values: auto hidden visible scroll,
),
返回顶部