Absolutely positioned flex item is not removed from the normal flow in IE11

后端 未结 4 741
误落风尘
误落风尘 2020-11-22 08:52

We have two divs with content and a third div that is a background with absolute position.

Container is a flexbox.

All works fine in Chrome and Safari, but <

4条回答
  •  执笔经年
    2020-11-22 09:31

    It is happening because justify-content: space-between; Distribute items evenly The first item at the start, the last at the end. So just putt

    Background
    between
    Content 1
    and
    Content 2
    like this

    Content 1
    Background
    Content 2

    You can see the reason on https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content

提交回复
热议问题