align-items: stretch
と宣言された直接の子供を持つフレックスボックスがあります。フレックスボックスで 'height:100%'と 'align-items:stretch'を使用
このフレックスボックスの直接の子供の中で、私はdivのコンテナを持っていて、その親のフルハイトを使っています(height: 100%
を設定します)。
しかし、flexboxの直接の子にheight: 100%
を設定しない限り、divコンテナは親の100%の高さに伸びません。
これはバグですか?フレックスボックスの子供をalign-items: stretch
とheight: 100%
に設定して、私が望むことを達成する必要がありますか?私には重複しているようです。ここで
は一例です:
html,
body {
margin: 0;
height: 100%;
}
.flexbox {
display: flex;
flex-direction: row;
height: 100%;
background-color: green;
}
.flexbox-child {
// height: 100%; uncommenting this will get it to work
align-items: stretch;
background-color: blue;
}
.flexbox-grand-child {
height: 100%;
background-color: red;
}
<div class="flexbox">
<div class="flexbox-child">
<div class="flexbox-grand-child">
I want to be stretched till the bottom
</div>
</div>
</div>
http://plnkr.co/edit/FACkwsC2y65NcbOaceur?p=preview
ありがとう!
ええ、あなたはそれを後ろに持っていますが、バグはFFです。パーセンテージの高さは、高さが「明示的に指定された」場合にのみ有効です。 Imhoは伸ばしたフレックスアイテムではありません。 [Example fiddle](http://jsfiddle.net/woestijnrog/nbx92s5a/) – woestijnrog
@woestijnrogはい、しかしFirefoxの動作は意味をなさないかもしれません。私の更新を参照してください。 – Oriol
詳細な回答ありがとうございます。 Btw、「新しいミニハイト:オート」はどういう意味ですか? – gipouf