Scroll container
Ascroll container is an element box in which content can be scrolled, whether or not scroll bars are present. A user agent adds scroll bars to an element box to make it a scroll container when the CSSoverflow property is set toscroll or whenoverflow is set toautoand the content overflows the container.
When the content of an element box overflows its bounding box, users can use scroll bars to scroll through the clipped content that is otherwise hidden from view.
A scroll container includes a scrollport and scroll bars.
In this article
Scrollport
The scrollport is the visible part of a scroll container and coincides with the padding box of the scroll container. The scroll bars are used to move content in and out of the scrollport so that the content can be viewed.
See also
- Learn: Overflowing content
- Scroll snapping, includingscroll snap container
- CSS overflow module
- CSS overscroll behavior module
- CSS scroll snap module
- CSS scroll-driven animations module