CSS Overflow - CSS: Cascading Style Sheets 编辑

The CSS Overflow module contains the features of CSS relating to scrollable overflow handling in visual media. In CSS overflow happens when the content of a box extends past one or more of the box's edges.

Ink overflow and scrollable overflow

There are two types of overflow that you might encounter in CSS. The first is described as ink overflow. This is the overflow of painting effects which do not affect layout or otherwise extend the scrollable overflow region, such as box shadows, border images, text decoration, overhanging glyphs, outlines, etc.

The overflow that we sometimes need to manage in CSS is described as scrollable overflow. This is the content appearing outside of the box for which scrolling mechanisms need to be provided. The overflow properties are how we can control what happens when content overflows a box.

Basic example

The following interactive example shows how changing the value of the overflow property, changes how the overflow of a fixed height box is dealt with.

Reference

CSS properties

Non-standard properties

Specifications

SpecificationStatusComment
CSS Overflow Module Level 3
The definition of 'overflow' in that specification.
Working Draft

Changed syntax to allow one or two keywords instead of only one

CSS Level 2 (Revision 1)
The definition of 'overflow' in that specification.
RecommendationInitial definition.

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:100 次

字数:7192

最后编辑:6年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文