在下面的示例中,为什么overflow: hidden;
对 tile 对象不起作用?
#tileContainer {
background-color: gray;
padding: 10px;
}
.tile {
display: inline-block;
padding: 10px;
margin: 10px;
width: 120px;
height: 120px;
background-color: white;
overflow: hidden;
}
.tile i {
opacity: .25;
position: absolute;
font-size: 150px;
left: -10px;
top: 25px;
}
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<div id="tileContainer">
<div class="tile">
<i class="material-icons">account_balance</i>
<div id="tileContent">
Stuff goes here.
</div>
</div>
<div class="tile">
<div id="tileContent">
Stuff goes here.
</div>
</div>
</div>
期望的结果更像这样: