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 @   龙卷风吹毁停车场  阅读(379)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」
历史上的今天:
2021-12-02 vue 获取指定元素滚动条位置
点击右上角即可分享
微信分享提示