【问题标题】:Flexbox overflow-y: scroll not working in IE,Edge and Firefox [duplicate]Flexbox 溢出-y:滚动在 IE、Edge 和 Firefox 中不起作用 [重复]
【发布时间】:2018-08-03 14:48:45
【问题描述】:

我有一个wraper div 有一些孩子。由于所有孩子的高度加起来大于wrapper div,我希望父母能够滚动。

以下解决方案适用于 Chrome,但不适用于 Edge、IE 和 Firefox。我尝试了不同的方法,但我的解决方案似乎都不起作用。有没有人有任何可以跨不同浏览器工作的解决方案?

#wrapper {
  display: flex;
  flex-direction: column-reverse;
  background-color: green;
  width: 300px;
  height: 300px;
  overflow-y: scroll;
}

.inner {
  background-color: red;
  height: 100px;
  width: 100px;
  margin-top: 10px;
  min-height: 100px;
}
<div id="wrapper">
  <div class="inner">hello</div>
  <div class="inner">hello</div>
  <div class="inner">hello</div>
  <div class="inner">hello</div>
  <div class="inner">hello</div>
  <div class="inner">hello</div>
</div>

【问题讨论】:

    标签: html css flexbox


    【解决方案1】:

    没关系。我找到了解决方案here。似乎这是 Flexbox 本身的一个错误。

    【讨论】:

      猜你喜欢
      • 2016-09-21
      • 2020-10-12
      • 1970-01-01
      • 2018-02-04
      • 1970-01-01
      • 2017-08-27
      • 1970-01-01
      • 2016-11-12
      • 1970-01-01
      相关资源
      最近更新 更多