簡體   English   中英

引導移動菜單不滾動而不是背景滾動

[英]bootstrap mobile menu not scrolling instead the background is scrolling

我在引導程序中完成了一個網站,菜單在桌面上運行良好

 <button type="button" class="dropdown-toggle pull-left" data-toggle="dropdown" data-target="#navbar-menu" aria-expanded="true"> <i class="fa fa-bars"></i><span style="font-size: 10px;width:100%;float: left;"><b>menu</b></span> </button>

現在,當我在移動設備上加載它並打開菜單時,它沒有滾動,所以我無法在下拉菜單中看到選項,而是背景正在滾動,我在谷歌中搜索並看到了一個答案,如下所示:

 .navbar-nav { height: 150vh; // <-- This will fix the collapse animation }.navbar-collapse.in { overflow-x: hidden; padding-right: 17px; // <-- Hide scroll bar, but still being able to scroll } @media (min-width: 768px) {.navbar-nav { height: auto; } }

但菜單仍然沒有滾動,背景正在滾動。 誰能告訴我這里有什么問題,這是我的現場 url在此處輸入鏈接描述

提前致謝

我終於解決了這個問題,我給了菜單 hieght 並給了溢出滾動

 .navbar-nav { max-height:400px; overflow-y: scroll; }

只需將 'navbar-nav-scroll' class 添加到現有的 'navbar-nav' class 中,希望能解決所有滾動問題

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM