2017-10-11 134 views
-1

我有固定導航欄的問題。我希望我的導航欄可以滾動。好吧,我加入到我的.nav溢出-X:滾動,當我有我的導航欄導航某些項,它看起來像:導航欄溢出後導航欄項目減少引導程序

enter image description here

當導航項「溢出」導航欄,它看起來是:

enter image description here

HTML:

<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-bottom"> 
<ul class="navbar-nav mr-auto"> 
    <li class="nav-item"> 
    Ostatnie notowania: 
    </li> 
    <li v-for="list in listsList" :class="{ active: checkActive(list.toUrl) }" class="nav-item"> 
    <a @click.prevent="openList(category, list.toUrl)" href="#">{{ list.toView }}</a> 
    <click-confirm style="display: inline-block;" button-size="sm" :messages="{ title: 'Jesteś pewien?', yes: 'Tak', no: 'Nie' }"> 
     <i @click.prevent="deleteList(category, list.toUrl)" class="fa fa-times" aria-hidden="true"></i> 
    </click-confirm> 
    </li> 
</ul> 

nav { 
    overflow-x: scroll; 
} 

我不知道如何解決這個問題,我需要幫助。

+0

請提供問題中的錯誤代碼。否則沒有人能夠幫助。 – Jay

+0

你想讓你的導航欄垂直或水平滾動嗎?你可以創建一個小提琴嗎?有這麼多可能導致這種情況,最好不要假設。 – zsawaf

回答

0

檢查您的導航欄父項中是否有任何固定寬度或容器寬度,然後將其寬度設置爲其父項的100%,並且您聲明瞭任何固定寬度。