问题
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