Home > Article > Web Front-end > Detailed introduction to CSS overflow property
I encountered a multiple-choice question during the interview today. The title is as follows:
I was not sure at the time. I came back to check the information. According to the original words of W3C, I should choose True.
All major browsers support the overflow attribute.
Note: The attribute value "inherit" is not supported by any version of Internet Explorer (including IE8).
The overflow attribute specifies what happens when content overflows the element box.
This attribute defines how content that overflows the content area of the element will be handled. If the value is scroll, the user agent provides a scrolling mechanism whether required or not. Therefore, it is possible that scrollbars will appear even if everything fits inside the element box.
Default: | visible |
---|---|
no | |
CSS2 | |
object.style.overflow="scroll" |
Description | |
---|---|
Default value. The content will not be trimmed and will be rendered outside the element box. | |
The content will be trimmed and the remaining content will be invisible. | |
The content will be trimmed, but the browser will display scroll bars to view the remaining content. | |
If content is trimmed, the browser displays scroll bars to view the remaining content. | |
Specifies that the value of the overflow attribute should be inherited from the parent element. |
The above is the detailed content of Detailed introduction to CSS overflow property. For more information, please follow other related articles on the PHP Chinese website!