当我有一个div
与border radius
和overflow hidden
包含一个内部div
从边界的“反锯齿”似乎影响内部分区。从容器冲击内部分区的边界半径
一个例子是比千言万语更好:
.container{
border:1px solid black;
height:2rem;
width:9rem;
/**/
overflow: hidden;
border-radius:0.4rem 0 0 0 ;
}
.sub{
/*border-radius:0.4rem 0 0 0 ;*/
background:purple;
width:2rem;
height:100%;
}
<div class="container">
<div class="sub">
</div>
</div>
因此,它是挺难看的,但如果你放大到像素级别是相当明显的。我知道这是挑剔的,但我看到它,它很烦人。
所以我想知道什么可能是解决方案呢?
我试着在内部div上设置z-index而没有运气。
您能解释一下您期望的输出吗? – WisdmLabs
这正是您需要解释的内容:http://tanalin.com/zh/blog/2011/08/border-radius-rendering/ – TheUknown