跳到主题内容 跳到文档导航栏

溢出(Overflow)

使用这些速记实用程序可以快速配置内容如何溢出元素。

在本页面

使用四个默认值和类动态调整 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变量来自定义溢出实用程序 。