溢出(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,
),