問題描述
我創建了一個響應式導航欄,但它使下面的元素,一個 Flexslider 插件,消失了.在我制作導航欄之前,下面的 Flexslider 會顯示得很好,但現在卻沒有.導航欄的 z-index 為 2,所以我不知道問題出在哪里.我應該如何/我應該改變什么以允許 Flexslider 顯示并且導航欄仍然響應?謝謝!
I created a responsive navigation bar, but it makes the element below, a Flexslider plug-in, disappear. Before I made the navigation bar, the Flexslider below would show up just fine, but now it doesn't. The z-index for the navbar is at 2, so I don't know what the problem is. How/What should I change to allow the Flexslider to show and the Navigation bar to still be responsive? Thank you!
我的代碼有點長,所以評論里有代碼筆(它不會讓我在這里發布它們,因為某種原因)
My code is a bit lengthy, so there are code pens in the comments (it won't let me post them up here for some reason)
這是一個沒有響應式導航的網站鏈接,但它顯示了 Flexslider:http://bancroftmiddleschool.org
Here is a link to the website without the responsive navigation, but it shows the Flexslider: http://bancroftmiddleschool.org
使用響應式導航鏈接到文件,但不顯示 Flexslider:http://bancroftmiddleschool.org/index%20copy.html
Link to file with Responsive Navigation, but doesn't show Flexslider: http://bancroftmiddleschool.org/index%20copy.html
推薦答案
改變#navBar中的位置CSS from position:absolute;到位置:相對;.
Change the position CSS in #navBar from position:absolute; to position: relative;.
#navBar{
position: relative;
/* leave rest of the css unchanged */
}
希望這是預期的效果.
這篇關于響應式導航欄隱藏其下方的元素的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!