首页
CSS
CSS 溢出
试用:使用 overflow: auto
运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> div { background-color: coral; width: 200px; height: 65px; border: 1px solid black; overflow: auto; } </style> </head> <body> <h2>Overflow: auto</h2> <p>The auto value is similar to scroll, only it add scrollbars when necessary:</p> <div>You can use the overflow property when you want to have better control of the layout. The overflow property specifies what happens if content overflows an element's box.</div> </body> </html>