| <!DOCTYPE html> |
| <html> |
| <!-- |
| | Overflow hidden should only affect the content within the padding box, |
| | and not the borders around it. Note that while it is somewhat unintuitive |
| | that we clip to the padding box and not the content box, this behavior is |
| | consistent with Chrome and IE. |
| | https://www.w3.org/TR/CSS21/visufx.html |
| --> |
| <head> |
| <style> |
| body { |
| font-family: Roboto; |
| font-size: 16px; |
| } |
| |
| .overflow { |
| width: 50px; |
| height: 50px; |
| padding: 50px; |
| border: 50px solid green; |
| overflow: hidden; |
| background: blue; |
| } |
| |
| .content { |
| background: red; |
| width: 200px; |
| height: 200px; |
| } |
| |
| </style> |
| </head> |
| <body> |
| <div class="overflow"> |
| <div class="content"></div> |
| </div> |
| </body> |
| </html> |