CSS overflow-y Property
Example
.example1 {
overflow-y: auto;
}
.example2 {
overflow-y: hidden;
}
.example3 {
overflow-y: scroll;
}
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Meaning
The overflow-y property sets what shows when content overflows a block-level element's top and bottom edges. This may be nothing, a scroll bar, or the overflow content.
Default value: | visible |
Inherited: | No |
Animatable: | No |
Version: | CSS3 |
JavaScript syntax: |
|
Standard Syntax
overflow-y: visible|hidden|scroll|auto|initial|inherit|revert|revert-layer|unset;
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Status
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
visible | This is default value. Specifies the content is not clipped, and it may be rendered outside the left and right edges. |
hidden | Specifies the content is clipped - and no scrolling mechanism is provided. |
scroll | Specifies the content is clipped and a scrolling mechanism is provided. |
auto | If content overflows the element's box it provides scrollbars to see the rest of the content. |
initial | Sets this property to its default value. |
inherit | If specified, the associated element takes the computed value of its parent element animation-delay property. |
revert | Reverts the cascaded value of the property from its current value to the value the property |
revert-layer | Rollback styles to the ones specified in previous cascade layers. |
unset | Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not. |
Default CSS Property Values
selectors {
overflow-y: visible;
}