首页
CSS
CSS Overflow
试用:使用 overflow: hidden
运行 ❯
获取您自己的网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <head> <style> div { background-color: coral; width: 200px; height: 65px; border: 1px solid black; overflow: hidden; } </style> </head> <body> <h2>Overflow: hidden</h2> <p>With the hidden value, the overflow is clipped, and the rest of the content is hidden:</p> <p>Try to remove the overflow property to understand how it works.</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>