簡體   English   中英

在滾動Navbar后面的滑塊和Silder視差效果不起作用

[英]On Scrolling Navbar Go Behind Slider And Silder Parallax Effect Is Not Working

當我向下滾動菜單欄時,在循環滑塊后面嘗試了z-index 1,但它不起作用,請給出任何提示,我不知道出了什么問題

    </div>
<img src="http://malsup.github.io/images/p1.jpg">
    <img src="http://malsup.github.io/images/p2.jpg">
    <img src="http://malsup.github.io/images/p3.jpg">
    <img src="http://malsup.github.io/images/p4.jpg">
</div>
</div>
<div class="section_about">

</div>

*{
    margin: 0;
    padding: 0;
}

/* Top Menu Start Here */

.top_nav{
    height: 90px;
    width: 100%;
    background: rgba(0,0,0,.5);
    position: fixed;
    z-index: 1;
    transition:all 0.7s ease;
    -webkit-transition:all 0.7s ease;
    -moz-transition:all 0.7s ease;
    -o-transition:all 0.7s ease;
    -ms-transition:all 0.7s ease;
}

.container{
    height: 100vh;
    width: 100%;
    max-width: 100%;
    background-image: url("https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcQ24kd_2tEzjbb_GdPnMQKog7lMCxtYmmy7dxjjpDr6d2ZseK-Dig");
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    top: 0;
}

.site-dt{
    background-color: #fff;
    height: 573px;
    width: 100%;
}


#slider-main{
    height: 578px;
    width: 100%;
    overflow: hidden;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

#slider-main #slider img{
    height: 100%;
    width: 100%;
}

.section_about{
    height: 573px;
    width: 100%;
    background-color: #de5670;
    overflow: hidden;
    position: absolute;
}

嘗試做一個

 display: block;

要么

 display: table;

在他們兩個。 為菜單設置索引2,為幻燈片容器設置索引0。 我希望這有幫助。

嘗試這個 :

#slider-main #slider img{
      height: 100%;
      width: 100%;
      position:absolute !important;
      z-index:2!important;
}

暫無
暫無

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

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