| <!DOCTYPE html> |
| <!-- |
| | "overflow" property affects the clipping of all of the element's content |
| | except any descendant elements whose containing block is the viewport or |
| | an ancestor of the element. |
| | https://www.w3.org/TR/CSS21/visufx.html#overflow |
| --> |
| <html> |
| <head> |
| <style> |
| .outer { |
| background-color: #3f51b5; |
| height: 100px; |
| margin-bottom: 100px; |
| overflow: hidden; |
| width: 100px; |
| } |
| .absolutely-positioned { |
| position: absolute; |
| } |
| .inner { |
| background-color: #2196f3; |
| height: 100px; |
| left: 50px; |
| position: absolute; |
| top: 50px; |
| width: 100px; |
| } |
| </style> |
| </head> |
| <body> |
| <div class="outer"> |
| <div class="inner"></div> |
| </div> |
| <div class="absolutely-positioned outer"> |
| <div class="inner"></div> |
| </div> |
| </body> |
| </html> |