[英]MixItUp animation with 'overflow: hidden' parent
I have problems with the MixItUp jQuery addon 我在MixItUp jQuery插件上遇到问题
When I initialize a MixItUp container inside a overflow: hidden
parent, I have animation problems on init and filtering. 当我在一个overflow: hidden
父级中初始化MixItUp容器时,我在初始化和过滤时遇到动画问题。
With overflow: hidden
there is another animation effect like this 随着overflow: hidden
有像另一个动画效果这
You can see an example on this fiddle 你可以在这个小提琴上看到一个例子
When you remove the overflow: hidden
in the jsfiddle example, it is working as expected. 当您除去jsfiddle示例中overflow: hidden
的overflow: hidden
,它会按预期工作。
In my project, the MixItUp is inside the iDangerous swiper, so I can't remove the 'oveflow: hidden', because it is necessary. 在我的项目中,MixItUp位于iDangerous swiper内,因此我无法删除“ oveflow:hidden”,因为这是必要的。
Is there a way to solve this problem, with css or script? 有没有办法使用CSS或脚本解决此问题?
HTML: HTML:
<div id="Container">
<div id="Container2">
<div class="mix"></div>
<div class="mix"></div>
<div class="mix"></div>
<div class="mix"></div>
</div>
</div>
<div class="filter" data-filter="all">All</div>
<div class="filter" data-filter="none">None</div>
CSS: CSS:
#Container {
overflow: hidden;
}
.mix {
background: black;
display: none;
width: 100px;
height: 100px;
}
Javascript: 使用Javascript:
$(function () {
$('#Container').mixItUp({
animation: {
effects: 'fade translateZ(-360px) stagger(34ms)'
}
});
});
Solved. 解决了。
Solution: Set a height to the #Container 解决方案:设置#Container的高度
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.