猫头鹰旋转木马,显示子绝对div,超过父溢出隐藏div [英] Owl Carousel, show child absolute div, over parent overflow hidden div
问题描述
我使用的是owl carousel 2,我面临以下问题。
我有父 div
name owl-stage-outer
,它根据传送带的要求具有 overflow:hidden
。
我有另一个孩子 div
name: ribbon
(显示New Arrival现在我面临的问题,在旋转的第一个项目,功能区是隐藏,因为溢出:hidden
I am using owl carousel 2, I am facing following problem.
I have parent div
with a name owl-stage-outer
, it has overflow:hidden
as per requirement of the carousel.
I have another child div
name: ribbon
(showing 'New Arrival' and 'Big Sale') which is position: absolute
Now the problem which I am facing, on first item of carousel, ribbon is hiding because of overflow: hidden
I have tried solution provided in this link, but it will only work on immediate child.
Thanks in Advance.
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;
">
这篇关于猫头鹰旋转木马,显示子绝对div,超过父溢出隐藏div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!