我有一个"复杂"如果您打开此链接,主要使用flexbox进行布局:http://jsbin.com/miyuwuyepu/1/edit?html,css,output 完全滚动到底部,您将在Chrome中看到正确的行为,但在Firefox中,顶部栏会从视图中消失(整个页面滚动)。
此行为是否是Firefox中的错误?有解决方法吗?这是正确的行为,但我错过了什么或做了一些我不应该做的事情?
html,
body,
.container {
width: 100%;
height: 100%;
margin: 0;
font-size: 10px;
}
.container {
width: 100%;
display: flex;
flex-direction: column;
margin: 0;
}
.header {
background-color: yellow;
width: 100%;
height: 3rem;
flex-shrink: 0;
}
.content {
background-color: aqua;
width: 100%;
height: 100%;
padding-top: 0.1rem;
display: flex;
padding: 0;
}
.side-bar {
background-color: green;
height: 100%;
width: 5rem;
flex-shrink: 0;
}
.boxes {
overflow: auto;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.box {
height: 8rem;
width: 8rem;
background-color: red;
margin: 1rem;
flex-shrink: 0;
}

<div class="container">
<div class="header"></div>
<div class="content">
<div class="side-bar"></div>
<div class="boxes">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
</div>
</div>
&#13;