我在这个小提琴中有一个问题片段:
https://jsfiddle.net/fsdjvv40/
body, html {
height: 100%;
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
width: 100%;
overflow: auto;
}
.main, .main-panel {
flex: 1;
}
.content-wrapper, .main {
display: flex;
}
.content-wrapper {
flex: 1;
overflow: hidden;
flex-direction: column;
height: 100%;
}
.sidebar-menu {
background: #2f2f2f;
color: #fff;
display: flex;
flex-direction: column;
width: 200px;
overflow-y: auto;
}
.infinite-scroll-component {
flex: 1 1 0px;
display: flex;
overflow-y: auto;
overflow-x: hidden;
will-change: contents;
transform: translateZ(0);
background: yellow;
}
.main-panel {
margin: 0;
width: 100%;
padding: 30px 30px 0;
display: flex;
flex-direction: column;
max-width: 100%;
}

<div class="content-wrapper">
<div class="main">
<div class="sidebar-menu"></div>
<div class="infinite-scroll-component">
<div class="main-panel">
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
<h1>PEPE</h1>
</div>
</div>
</div>
</div>
&#13;
基本问题是在Firefox中,给定代码段的滚动不起作用。但在其他浏览器中,它正在运行(Chrome,safari)。
有人可以解释一下为什么会发生这种情况吗?有趣的是要知道原因:)