The first link is flexbox 2009 model:
http://jsfiddle.net/vLKBV/
<div style="display:-webkit-box;height:100%">
<div style="background:#f00;width:50px">
</div>
<div style="display:-webkit-box;-webkit-box-align:center;-webkit-box-pack:center;background:#0f0;-webkit-box-flex:1;overflow-Y:scroll">
<div style="background:#000;width:10px;height:300px">
HELLO
</div>
</div>
<div style="background:#f00;width:50px">
</div>
and the second one is the revised 2011 - 2012 version:
http://jsfiddle.net/MNRgT/1/
<div style="display:-webkit-flex;height:100%">
<div style="background:#f00;width:50px">
</div>
<div style="display:-webkit-flex;-webkit-align-items:center;-webkit-justify-content:center;background:#0f0;-webkit-flex:1;overflow-Y:scroll">
<div style="background:#000;width:10px;height:300px">
HELLO
</div>
</div>
<div style="background:#f00;width:50px">
</div>
If you resize the result vertically you will see that "HELLO" dissapears in the newer flex model, and if you scroll down, it gives you a bottom white space. On the other hand the older flex model behaves correctly.
Is there any way around this in newest Chrome v26.0.1410.65?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…