0
私はguiをポスターの上にしたいです。両方の要素は固定された位置になければなりません。私はGUIの位置を絶対に設定するとうまく動作しますが、固定は機能しません。zインデックス固定親子
#gui {
width: 250px;
height: 50px;
position: fixed; // If I change to absolute then it works.
background-color: green;
}
#poster {
width: 250px;
height: 250px;
position: fixed;
background-color: red;
z-index: -1;
}
<div id='gui'>
<div id='poster'></div>
</div>
https://jsfiddle.net/pfpj03f5/
なぜこの作業ではないでしょうか? #guiのz-indexを正の数に設定しても動作しません。
は、あなたが他のdivは独立して文句を言わない仕事... –
を行う必要があります。
固定位置は、これだけのGUIの外にポスターを移動し、それが動作しますが、とにかく親要素のそれらをそれぞれ独立させることができ可能な重複http://stackoverflow.com/questions/12463658/parent-child-with-position-fixed-parent-overflowhidden-bug –