隐藏的溢出不适用于幻灯片

Overflow hidden is not working with slideshow

这是在创建幻灯片,但底部有滚动条和小的白色间隙。我把它放在 A DIV 里面,隐藏了相对和溢出,就像我在另一个主题上发现的那样,但它仍然显示滚动条。我假设我还需要做一些其他事情,但似乎无法在此处找到与我正在做的事情完全匹配的相关主题。

<style>
    ol,ul {
    list-style:none;
}
.cb-slideshow,
.cb-slideshow:after { 
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0px;
    left: 0px;
    z-index: 0; 
    overflow:hidden !important;
}
.cb-slideshow:after { 
    content: '';
    background: transparent url(../images/pattern.png) repeat top left; 
}
.cb-slideshow li span { 
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0px;
    left: 0px;
    color: transparent;
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: none;
    opacity: 0;
    z-index: 0;
    animation: imageAnimation 30s linear infinite 0s; 
}
.cb-slideshow li div { 
    z-index: 1000;
    position: absolute;
    top: 100px;
    left: 0px;
    width: 100%;
    text-align: center;
    opacity: 1;
    color: #fff;
    animation: titleAnimation 30s linear infinite 0s; 
}
.cb-slideshow li div h3 { 
    font-family: 'BebasNeueRegular', 'Arial Narrow', Arial, sans-serif;
    font-size: 240px;
    padding: 0;
    line-height: 200px; 
}

.cb-slideshow li:nth-child(1) span { 
    background-image: url(../images/1a.jpg) 
}
.cb-slideshow li:nth-child(2) span { 
    background-image: url(../images/2a.jpg);
    animation-delay: 6s; 
}
.cb-slideshow li:nth-child(3) span { 
    background-image: url(../images/3a.jpg);
    animation-delay: 12s; 
}
.cb-slideshow li:nth-child(4) span { 
    background-image: url(../images/4a.jpg);
    animation-delay: 18s; 
}
.cb-slideshow li:nth-child(5) span { 
    background-image: url(../images/5a.jpg);
    animation-delay: 24s; 
}


.cb-slideshow li:nth-child(2) div { 
    animation-delay: 6s; 
}
.cb-slideshow li:nth-child(3) div { 
    animation-delay: 12s; 
}
.cb-slideshow li:nth-child(4) div { 
    animation-delay: 18s; 
}
.cb-slideshow li:nth-child(5) div { 
    animation-delay: 24s; 
}


@keyframes imageAnimation { 
    0% { opacity: 0; animation-timing-function: ease-in; }
    8% { opacity: 1; animation-timing-function: ease-out; }
    17% { opacity: 1 }
    25% { opacity: 0 }
    100% { opacity: 0 }
}

@keyframes titleAnimation { 
    0% { opacity: 1 }
    8% { opacity: 1 }
    17% { opacity: 1 }
    19% { opacity: 1 }
    100% { opacity: 1 }
}

.no-cssanimations .cb-slideshow li span{
    opacity: 1;
}

@media screen and (max-width: 1140px) { 
    .cb-slideshow li div h3 { font-size: 140px }
}
@media screen and (max-width: 600px) { 
    .cb-slideshow li div h3 { font-size: 80px }
}
</style>


<div  style="overflow: hidden; position: relative; white-space: nowrap;">

    <ul class="cb-slideshow">
    <li><span>Image 01</span><div></div></li>
    <li><span>Image 02</span><div></div></li>
    <li><span>Image 03</span><div></div></li>
    <li><span>Image 04</span><div></div></li>
    <li><span>Image 05</span><div></div></li>
    </ul>  

</div>

经过一些调试,我发现 Perfect Scrollbar 正在激活。[​​=11=]

为了解决这个问题,我只为这个页面覆盖了它:

.ps-scrollbar-y-rail {
  display: none !important;
}