私はposition:relative ; bottom: 0;
を持つ子要素と、position: fixed ; height: 100vh;
を持つ親divを持っています。子要素が底には行かないのはなぜですか?あなたの下にはフルコードがあります。インスペクタでは、下部にある代わりに上部に.secondary
の形状が表示されます。固定親を持つ相対的な子のボトムプロパティは機能しません
HTML
<div class="fullpagenav active_nav">
<div id="secondary" class="secondary toggled-on" aria-expanded="true">
...
</div>
</div>
CSS
.fullpagenav {
position: fixed;
height: 100vh;
width: 100%;
z-index: 2;
}
.secondary.toggled-on {
width: 100%;
display: block;
bottom: 0;
position: relative;
}
? –