overflow

英[???v??fl??] US[?o?v?r?flo?]

vt.& vi. Overflow, drown; crowd, fill; overflow; overflow of resources

n. Flood, overflow; overflow pipe; overflow, excess; overflow

vi. Flood, overflow; overflow

adj. Overflow, fullness

css overflow property syntax

Function:The overflow attribute specifies what happens when the content overflows the element box.

Description: 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.?

Note: All major browsers support the overflow attribute. The attribute value "inherit" is not supported in any version of Internet Explorer (including IE8).

css overflow property example

<html>
<head>
<style type="text/css">
div 
{
background-color:#00FFFF;
width:150px;
height:150px;
overflow: scroll;
}
</style>
</head>
<body>
<p>如果元素中的內(nèi)容超出了給定的寬度和高度屬性,overflow 屬性可以確定是否顯示滾動條等行為。
</p>
<div>
這個屬性定義溢出元素內(nèi)容區(qū)的內(nèi)容會如何處理。
如果值為 scroll,不論是否需要,用戶代理都會提供一種滾動機制。
因此,有可能即使元素框中可以放下所有內(nèi)容也會出現(xiàn)滾動條。默認值是 visible。
</div>
</body>
</html>
Run instance ?

Click the "Run instance" button to view the online instance