Owl Carousel, show child absolute div, over parent overflow hidden div

无人久伴 提交于 2019-12-06 03:49:37

You can add this margin-left: 25px; its works.

<div class="owl-item active" style="width: 240px;margin-right: 60px;margin-left: 25px;">

EDIT :

Its works

add this of you container :

<div class="container" style="
    width: 1220px;
    padding: 0 40px 0 40px;
    overflow: hidden;
">

of your owl-stage-outer :

<div class="owl-stage-outer" style="
    overflow: visible;
">

Here's a fix (kind of dirty but it works) that you can try :

First you remove overflow: hidden of .owl-carousel .owl-stage-outer. It will show all your slider on 100% of the width of the page, yes.

But then you set position: relative; to .owl-carousel .owl-stage-outer instead of position: static;.

Then you add a :before on it like this to hide the left part :

.owl-carousel .owl-stage-outer:before {
    content: "";
    background: #fff;
    position: absolute;
    width: 100%;
    height: 700px;
    left: -100%;
    margin-left: -20px;
    top: 0;
    z-index: 10;
}

Of course you have to do the same with :after to hide the right content.

Try this solution

.owl-carousel .owl-stage-outer {
  margin: -25px;
  padding: 25px;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!