外部 div 具有边界半径和隐藏溢出。歌剧有问题(溢出不适用于角落)
HTML:
<div class="outher">
<div class="inner"></div>
</div>
CSS:
.outher{
width:200px;
height:150px;
background-color:#a00;
border-radius:30px;
overflow:hidden;
}
.inner{
opacity:0.8;
width:100%;
height:100%;
background-color:yellow;
}
Jsfiddle 链接:http: //jsfiddle.net/6ee3R/1/