| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| .container { |
| position: absolute; |
| z-index: 1; |
| left: 100px; |
| height: 50px; |
| width: 500px; |
| border-radius: 0 25px 25px 0; |
| background-color: silver; |
| box-sizing: border-box; |
| transform: translateZ(0); |
| } |
| |
| .child { |
| position: absolute; |
| top: 20px; |
| left: 20px; |
| height: 50px; |
| width: 220px; |
| border: 4px solid green; |
| padding: 10px; |
| background-color: orange; |
| transform: translateZ(0); |
| } |
| </style> |
| </head> |
| <body> |
| <div class="container" style="top: 50px;"> |
| <div class="child"> |
| this element should not be clipped |
| </div> |
| </div> |
| |
| <div class="container" style="top: 200px; border-radius: 0px"> |
| |
| <div class="child"> |
| this element should not be clipped |
| </div> |
| </div> |
| |
| <div class="container" style="top: 350px; overflow: hidden;"> |
| <div class="child"> |
| this element should be clipped |
| </div> |
| </div> |
| |
| <div class="container" style="top: 500px; overflow: hidden; border-radius: 0px"> |
| |
| <div class="child"> |
| this element should be clipped |
| </div> |
| </div> |
| </body> |
| </html> |