主页
CSS
CSS Overflow
尝试:使用 overflow-x 和 overflow-y
运行 ❯
获取您的
自有
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> div { background-color: coral; width: 200px; height: 65px; border: 1px solid black; overflow-x: hidden; overflow-y: scroll; } </style> </head> <body> <h2>Overflow-x and overflow-y</h2> <p>You can also change the overflow of content horizontally or vertically.</p> <p>overflow-x specifies what to do with the left/right edges of the content.</p> <p>overflow-y specifies what to do with the top/bottom edges of the content.</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>