当具有overflow: hidden;
和border-radius
属性的块的内容被翻译时,其边角不会被隐藏。是否有解决方案来修复这个问题?
HTML
<div class="scroller">
<div class="scroller-content"></div>
</div>
CSS
.scroller{
width: 300px;
height: 500px;
border: 3px solid red;
border-radius: 30px;
overflow: hidden;
}
.scroller-content{
width: 300px;
height: 300px;
background: green;
-webkit-transform: translate3d(0, -8px, 0);
}