Remove Fade From Flickity Slider Transitions

假装没事ソ 提交于 2019-12-24 19:33:19

问题


I've used flickity slider a few times, and awhile back came across a pen (may have been found on here although I can't find the question), where the slide transition uses a fade effect rather than the default effect.

The original pen is somewhat outdated (https://codepen.io/eikeco/pen/MwGRKr), but here is basically the exact same one with updated js/css. https://codepen.io/mzq/pen/WaKvVz

The only real modification to the original slider I believe is this:

  .carousel-cell {
    left: 0 !important;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    z-index: -1;
    }

What I'd like to accomplish (if possible), but have been unable to, is change the transition so it doesn't have that blip/fade if the images or text remains the same from one slide to the next.

I generally use background images where it's more noticeable like here: https://codepen.io/mzq/pen/moyKbL

Ideally if two slides are identical there should be no noticeable transition but I also don't want it to flip instantly if they are different, which is the result I typically get. Maybe it's not possible, or not with this slider.

来源:https://stackoverflow.com/questions/54894668/remove-fade-from-flickity-slider-transitions

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