[英]Body not wrapping content (not float or body,html 100% thing…)
當瀏覽器寬度介於767-960像素之間時,為什么地獄不是body / html或.main div包裝我的.container div? 這使您能夠水平滾動。 我很困惑,這應該工作!
我所有的代碼都是這樣的:
html, body {
width: 100%;
}
.container {
.clearfix;
margin: 0 auto;
}
@media (min-width: 767px) {
.page-header
{
height: 180px;
}
.container {
width: 960px;
}
}
通過將此添加到媒體查詢來解決此問題:
html, body {
min-width: 960px; // <= width of the .container
}
如果有人能解釋這個(為什么.container不推動身體為960px)id很高興!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.