swiper 滚动时出现半屏,错乱

this.mySwiper = new Swiper('.swiper-container', {
                        direction: 'vertical',
                        initialSlide : 0 , //设定初始化时slide的索引。
                        mousewheel: true, //开启鼠标滚动切换
                        height: window.innerHeight, //强制Swiper的高度(px)
                        autoplay: false,    //自动播放
                        observer:true,
                        autoHeight: true, //高度随内容变化 添加此属性
                        observeParents:true,
                        loop: false,        //循环播放w
                        delay: 1000,       //每张图间隔三秒
                        on: {
                            slideChangeTransitionStart: function () {
                                _this.active = this.activeIndex
                            }
                        },
                    });

 

posted @ 2022-12-02 16:08  龙卷风吹毁停车场  阅读(413)  评论(0)    收藏  举报