-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to display a partial view of the next slide? #530
Comments
like this? |
How was it done? |
This is one part of the Code. vm.swiper = new Swiper3(vm.$els.swiperContainer, {
speed: 500,
loop: true,
slidesPerView: "auto",
spaceBetween: 12,
autoplay: 3000,
autoplayDisableOnInteraction : false,
onSlideChangeStart: function (swiper) {
// chang opacity
var slide = $(swiper.slides[swiper.activeIndex]);
var index = ~~slide.data("swiperSlideIndex");
var container = $(swiper.container[0]);
container.find(".swiper-slide").removeClass("active")
.filter("[data-swiper-slide-index='" + index + "']")
.addClass("active");
vm.index = index;
},
}); @ratio: 16rem / 750;
.swiper-container{
height: 432 * @ratio;
padding: 0 12px;
overflow: hidden;
.swiper-slide{
position: relative;
width: 680 * @ratio;
height: 432 * @ratio;
overflow: hidden;
opacity: .3;
transition: opacity .5s ease-out;
&.active{
opacity: 1;
}
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
How would I go about showing a partial view of the next slide? In my case, I'm swiping left and I want the slide that's to the right of my current slide to be partially visible.
The text was updated successfully, but these errors were encountered: