How to make a sticky footer using flexbox in IE11?

后端 未结 5 1520
春和景丽
春和景丽 2020-11-29 08:56

I\'m trying to make a simple design with flexbox but I\'m having trouble with IE11. Basically, I want a footer that sticks to the bottom only if the content is not high enou

5条回答
  •  半阙折子戏
    2020-11-29 09:00

    On main, instead of flex: 1 use flex: auto. That should be all you need.


    The flex: 1 shorthand rule breaks down to:

    • flex-grow: 1
    • flex-shrink: 1
    • flex-basis: 0

    The flex: auto shorthand rule breaks down to:

    • flex-grow: 1
    • flex-shrink: 1
    • flex-basis: auto

    IE has trouble parsing flex-basis: 0.

    More information:

    • flex property not working in IE

提交回复
热议问题