| 123456789101112131415161718192021222324252627282930313233 |
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>044 overflow hidden</title>
- <style>
- html, body { margin: 0; padding: 0; background: #ffffff; color: #202020; }
- body { font-family: sans-serif; font-size: 13px; padding: 10px; }
- h1 { font-size: 20px; margin: 0 0 6px 0; }
- p { margin: 0 0 10px 0; }
- .pane { float: left; width: 440px; margin-left: 10px; }
- .label { background: #eeeeee; padding: 4px 6px; margin-bottom: 4px; }
- .stage { width: 200px; height: 100px; overflow: hidden;
- background: #eeeeee; border: 1px solid #999999; }
- .big { position: relative; left: 30px; top: 30px; width: 300px;
- height: 200px; background: #cc3333; }
- .small { position: relative; left: 30px; top: 30px; width: 170px;
- height: 70px; background: #cc3333; }
- </style>
- </head>
- <body>
- <h1>044 · overflow: hidden</h1>
- <p>The large red child must be clipped to the visible 170×70 rectangle in both panes.</p>
- <div class="pane">
- <div class="label">A · overflow: hidden</div>
- <div class="stage"><div class="big"></div></div>
- </div>
- <div class="pane">
- <div class="label">B · clipped reference</div>
- <div class="stage"><div class="small"></div></div>
- </div>
- </body>
- </html>
|