| <!DOCTYPE html> |
| <html> |
| <!-- |
| | Overflow hidden and position absolute div with position absolute children. |
| | The overflow hidden applied to the positioned children. |
| | https://www.w3.org/TR/CSS21/visufx.html |
| --> |
| <head> |
| <style> |
| body { |
| font-family: Roboto; |
| font-size: 16px; |
| } |
| |
| .red { |
| width: 400px; |
| height: 20px; |
| background-color: #FF0000; |
| } |
| |
| .positioned-overflow { |
| position: absolute; |
| overflow: hidden; |
| width: 300px; |
| height: 50px; |
| background-color: #00CC00; |
| } |
| |
| .positioned { |
| position: absolute; |
| top: 60px; |
| } |
| </style> |
| </head> |
| <body> |
| <div class="positioned-overflow"> |
| <div class="red"> This is not absolute positioned red. Only partial of this line is visible and red. </div> |
| <div class="red positioned"> This line is invisible. </div> |
| </div> |
| </body> |
| </html> |