flexbox misbehaving with max-height

后端 未结 4 839
夕颜
夕颜 2020-12-05 17:34

My issue is probably best explained by example. This following jsfiddle will work in Chrome:

http://jsfiddle.net/ga6g4/

As you can see, I\'ve got a fixed-hei

4条回答
  •  春和景丽
    2020-12-05 18:10

    OK, here's the solution I ended up with if anyone is interested:

    http://jsfiddle.net/vN65r/

    Basically, I had to apply the following to the fixed-height header:

    flex: 0 0 auto;
    

    And the following to the variable-height, scrolling body:

    flex: 0 1 auto;
    

    I hope it helps somebody

提交回复
热议问题