【问题标题】:IE Flexbox - Child Element does not stretch when using min-height on parentIE Flexbox - 在父级上使用最小高度时子元素不会拉伸
【发布时间】:2015-04-01 23:01:09
【问题描述】:

请看看这支笔:

http://codepen.io/anon/pen/ZYZLMG

它应该做的是让红色的.section 元素填充蓝色的.container 元素。它适用于 Chrome 和 FF,但不适用于 IE。

当设置height 而不是min-height 时,它可以工作,但我需要min-height,因为包含的元素可能会超过容器的大小。

有没有办法让它发挥作用?

【问题讨论】:

    标签: html css internet-explorer flexbox


    【解决方案1】:

    为了解决这个问题,我需要将 min-height 元素包装在另一个 flexbox 行中。

    http://s.codepen.io/boomerang/cf5b323f92549ea4b9e9aa3afcee9fc41427899803437/index.html#https://github.com/philipwalton/flexbugs#3-min-height-on-a-column-flex-container-wont-apply-to-its-flex-items

    不漂亮,因为我必须为“样式”添加另一个元素,但是它可以工作。

    【讨论】:

    • 会做,但它让我等了 3 天才被允许 -.-
    • 找不到页面(
    猜你喜欢
    • 2019-12-13
    • 2016-04-09
    • 2018-10-28
    • 2018-08-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-10
    • 2018-10-14
    相关资源
    最近更新 更多