0
li高度未定義,它會隨內容自動更改。然而,它只是隨着其內容的右側而不是左側而改變。已經改變左側阻止,但它不起作用。鏈接如下: [http://ec2-52-32-145-125.us-west-2.compute.amazonaws.com/#/posts][1]CSS ul li高度不包括內容
li高度未定義,它會隨內容自動更改。然而,它只是隨着其內容的右側而不是左側而改變。已經改變左側阻止,但它不起作用。鏈接如下: [http://ec2-52-32-145-125.us-west-2.compute.amazonaws.com/#/posts][1]CSS ul li高度不包括內容
添加到您的CSS:
.posts li {
overflow: auto;
}
請投票關閉[此問題]的副本(http://stackoverflow.com/questions/4837809/floated-element-gets-outside-of-its-parent)並刪除此答案。這是一個常見問題,無需保留這個問題...... – misterManSam
這是幾乎完全一樣,這個問題:[浮動元素獲得境外母公司的(HTTP:/ /stackoverflow.com/questions/4837809/floated-element-gets-outside-of-its-parent)左側圖像是浮動的,不包含在父級中。 – misterManSam
另一種解決方案是使用[clearfix as shown here。](http://stackoverflow.com/questions/8554043/what-is-clearfix) – misterManSam
非常感謝。有用。我會關閉它。 –