如您所见,子元素 [update] 超出了父元素 [feeds]。我该如何解决这个问题?
#updates {
background: #B8C1C2;
box-shadow: inset 0 0 5px;
height: 100%;
float: right;
position: fixed;
top: 0;
right: 0;
z-index: 100;
overflow: auto;
}
#feeds {
width: auto;
height: 300px;
}
.update {
border-bottom: 1px solid #929493;
width: auto;
height: auto;
padding-bottom: 20px;
margin-top: 10px;
}
谢谢!
最佳答案
你可以使用 overflow-x: hidden;如果您希望包含提要并滚动。在这里查看:jsfiddle.net/MathiasaurusRex/zP49Z/2
#feeds {
width: auto;
height: 300px;
overflow-x: hidden;
}
关于html - child 走出父元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19886054/