2016-03-02 39 views
0

我想在bootsrap的主容器中放置一個導航,但是當我把它放在主容器內時,我甚至不能點擊導航,就好像它是另一個元素一樣。一個容器內的一個boostrap div

enter image description here

<div class="container" id="faqe1"> 


    <div class="dotstyle dotstyle-tooltip"> 

       <ul> 
        <li class="current"><a href="#">Home</a></li> 
        <li><a href="#">About</a></li> 
        <li><a href="#">Products</a></li> 
        <li><a href="#">Portfolio</a></li> 
        <li><a href="#">Blog</a></li> 
        <li><a href="#">Contact</a></li> 
       </ul> 
      </div> 




    </div> <!-- Kontaineri --> 

我試圖

z-index 

,但沒有喜悅!

任何幫助?

EDITED

繼承人導航的CSS

.dotstyle ul { 
    position: relative; 
    display: inline-block; 
    margin: 0; 
    padding: 0; 
    list-style: none; 
    cursor: default; 
    -webkit-touch-callout: none; 
    -webkit-user-select: none; 
    -khtml-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 

    top:25em; 
    left: -8em; 

    transform: rotate(90deg) 


} 

.dotstyle li { 
    position: relative; 
    display: block; 
    float: left; 
    margin: 0 16px; 
    width: 16px; 
    height: 16px; 
    cursor: pointer; 




} 

.dotstyle li a { 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    outline: none; 
    border-radius: 50%; 
    background-color: #fff; 
    background-color: rgba(255, 255, 255, 0.3); 
    text-indent: -999em; /* make the text accessible to screen readers */ 
    cursor: pointer; 
    position: absolute; 





} 

.dotstyle li a:focus { 
    outline: none; 
} 

/* Individual styles and effects */ 



/* Tooltip */ 

.dotstyle-tooltip li { 
    border: 1px solid #fff; 
    border-radius: 50%; 
    z-index: 1; 
    -webkit-transition: border-color 0.3s ease; 
    transition: border-color 0.3s ease; 






} 

.dotstyle-tooltip li a { 
    top: auto; 
    bottom: 250%; 
    left: 50%; 
    visibility: hidden; 
    padding: 0 10px; 
    width: auto; 
    height: auto; 
    border-radius: 5px; 
    background-color: #c44d48; 
    color: #fff; 
    text-indent: 0; 
    line-height: 2; 
    opacity: 0; 
    -webkit-transform: translateX(-50%) translateY(-50%); 
    transform: translateX(-50%) translateY(-50%); 
    -webkit-transition: -webkit-transform 0.3s ease, opacity 0.3s ease, visibility 0s 0.3s ease; 
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s 0.3s ease; 




} 

.dotstyle-tooltip li a::after { /* http: //cssarrowplease.com/ */ 
    position: absolute; 
    left: 50%; 
    margin-left: -10px; 
    width: 0; 
    height: 0; 
    border: solid transparent; 
    border-width: 10px; 
    border-color: transparent; 
    border-top-color: #c44d48; 
    content: ''; 
    pointer-events: none; 
    top: 99%; 
    -webkit-backface-visibility: hidden; 
    backface-visibility: hidden; 
    -webkit-transition: opacity 0.3s ease; 
    transition: opacity 0.3s ease; 


} 

.no-touch .dotstyle-tooltip li:hover a, 
.dotstyle-tooltip li.current a { 
    z-index: 100; 
    visibility: visible; 
    opacity: 1; 
    -webkit-transform: translateX(-50%) translateY(0%); 
    transform: translateX(-50%) translateY(0%); 
    -webkit-transition: -webkit-transform 0.3s ease, opacity 0.3s ease; 
    transition: transform 0.3s ease, opacity 0.3s ease; 




} 

.dotstyle-tooltip li.current { 
    border-color: #c44d48; 
} 

.dotstyle-tooltip li:hover { 
    z-index: 100; 
} 

.no-touch .dotstyle-tooltip ul:hover li.current a { 
    opacity: 0.2; 
} 

.dotstyle-tooltip ul li.current:hover a { 
    opacity: 1; 
} 

,我也有這樣的容器背景漸變疊加:

html, 
body { 
    height: 100%; 
} 


#faqe1 { 

    width: 100%; 
    height: 100%; 
    margin: 0; 
    padding: 0; 
    background-image:url("../images/Unknown-2.jpg"); 
    background-attachment: fixed; 
    background-repeat: no-repeat; 
    position: relative; 
    z-index: -2; 


} 


#faqe1:before { 
    content: " "; 
    width: 100%; 
    height: 100%; 
    position: absolute; 
    z-index: -9999; 
    top: 0; 
    left: 0; 
    background: -webkit-linear-gradient(rgba(255,155,245,.8) 0%,rgba(0,155,0,.6) 100%); 
} 
+0

不知道你是什麼意思?它對我來說工作正常https://jsfiddle.net/DTcHh/17618/ – zee

+0

你有CSS嗎?開發人員網站鏈接等 – sscotti

+0

編輯的問題,請注意,它不是引導程序的默認導航。它是一個正常的分區。但是當我將它從容器中取出時,它的工作原理卻在頁面頂部出現了空隙。我希望它留在助推器容器內,但是當我把它放在裏面時,我不能點擊或懸停在它上面等等,就像上面有smthng一樣,所以這就是爲什麼我認爲它是一個Z-索引的東西,但它沒有工作 –

回答

1

在#faqe1的Z-index是導致問題的原因之一,當你擺脫它時,你應該能夠訪問鏈接。見下面這個鏈接:

faqe1 {

width: 100%; 
height: 100%; 
margin: 0; 
padding: 0; 
background-image:url("../images/Unknown-2.jpg"); 
background-attachment: fixed; 
background-repeat: no-repeat; 
position: relative; 

}

Codepen Link

+0

太棒了! @VinceBinamira :)當你有很多z-索引ü搞砸的東西了,這就是爲什麼stackoverflow在這裏。謝謝你們。 –

+0

沒問題,很樂意幫忙 – VinceBinamira

相關問題