我有一个圆圈,圆圈的右侧和底部略微延伸到父div的外面。为什么?我怎样才能解决这个问题? Circle离开Parent Div
.player-holder {
height: 100px;
max-width: 100px;
min-width: 50px;
}
.player-thumb {
margin: auto;
height: 100%;
min-width: 50px;
width: 100px;
border-radius: 100%;
border: 1px solid #ccc;
overflow: hidden;
background-color: #f8f8f8;
background-image: url("chat-icon.png");
background-repeat: no-repeat;
background-position: center center;
background-size: 50px;
}
<div class="player-holder">
<a href="#">
<div class="player-thumb"></div>
</a>
</div>
底部的情况如何?我将高度切换到102px,但圆圈仍在父div – altoids
之外我在上面编辑了我的评论。检查.player-thumb高度 –
说实话,我认为[Douwe的回答](https://stackoverflow.com/a/44563551/3316645)不仅具有更好的解决方案,而且更好地解释了发生了什么。你可能想检查一下。 – domsson