源代碼
點擊運行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>教程</title> <style> div { background-color:#00FFFF; width:150px; height:150px; overflow:auto; } </style> </head> <body> <p>overflow 屬性規定當內容溢出元素框時發生的事情。</p> <div> 當你想更好的控製布局時你可以使用 overflow 屬性。嘗試修改 overflow 屬性為: visible, hidden, scroll, 或 inherit 併查看傚果。 默認值為 visible。 </div> </body> </html>
運行結果