我试图让移动菜单可滚动,同时在打开时将页面内容保持在固定点。你会注意到通过页面底部滚动菜单的不受欢迎的可见性
<div class="navigation mobile">
<div class="menu-wrap">
<div class="project-tile">
<div class="copy">
<h2><a href="#">Title</a></h2>
<a href="#">View project</a>
</div><!-- /copy -->
</div><!-- /project-tile -->
<div class="project-tile">
<div class="copy">
<h2><a href="#">Title</a></h2>
<a href="#">View project</a>
</div><!-- /copy -->
</div><!-- /project-tile -->
</div><!-- /menu-wrap -->
</div><!-- /navigation -->
<input type="checkbox" id="nav-trigger" class="nav-trigger mobile" />
<label class="mobile" for="nav-trigger">Menu</label>
<div id="content" class="site-wrap">
Copy</div>
</div>
答案 0 :(得分:1)
尝试更改导航元素的位置并添加溢出滚动,如此
.navigation
{
position: fixed;
overflow-y: scroll;
}