Clip child to parent element with border-radius
How do I force clip a child to a parent element that has rounded corners. <div class="item" > <div class="top"> <h1>Tile</h1> <h2>Click me</h2> </div> <div class="behind"> <h3>Details</h3> </div> </div> When animating the child, its ignores the border-radius of the parent element. Is there a way to fix the two corners on the top? .item{ text-align: center; cursor: pointer; overflow: hidden; height: 280px; width: 280px; float: left; border-radius: 5px; background: white; margin: 10px; position: absolute; } .top{ z-index: 1; position: absolute; height: 280px; width: 280px; background: #ed844b;