当前位置:网站首页>Swiper系列之轮播图
Swiper系列之轮播图
2022-08-02 11:51:00 【老__L】
1、引入 CSS 文件
<link rel="stylesheet" href="./swiper/swiper-bundle.min.css" />
2、引入 js 文件
<script src="./swiper/swiper-bundle.min.js"></script>
3、页面布局
<!-- Swiper -->
<div class="slider swiper">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="./img/slider1.png" alt="" />
</div>
<div class="swiper-slide">
<img src="./img/slider1.png" alt="" />
</div>
<div class="swiper-slide">
<img src="./img/slider1.png" alt="" />
</div>
<div class="swiper-slide">
<img src="./img/slider1.png" alt="" />
</div>
<div class="swiper-slide">
<img src="./img/slider1.png" alt="" />
</div>
<div class="swiper-slide">
<img src="./img/slider1.png" alt="" />
</div>
<div class="swiper-slide">
<img src="./img/slider1.png" alt="" />
</div>
<div class="swiper-slide">
<img src="./img/slider1.png" alt="" />
</div>
</div>
<div class="swiper-pagination"></div>
</div>
4、js 逻辑编写
var swiper = new Swiper(".slider", {
autoplay: {
delay: 1000,
// loop: true,
stopOnLastSlide: false,
disableOnInteraction: false,
observer: true, //开启动态检查器,监测swiper和slide
observeParents: true //监测Swiper 的祖/父元素
},
pagination: {
el: ".swiper-pagination"
}
});
后记
如果你感觉文章不咋地
//(ㄒoㄒ)//,就在评论处留言,作者继续改进;o_O???
如果你觉得该文章有一点点用处,可以给作者点个赞;\\*^o^*//
如果你想要和作者一起进步,可以微信扫描二维码,关注前端老L;~~~///(^v^)\\\~~~
谢谢各位读者们啦(^_^)∠※!!!

边栏推荐
- Several reasons why applet plugins benefit developers
- 数字化转型中的低代码
- 服务器间传输文件
- According to the field classification Golang map array
- 喜迎八一 《社会企业开展应聘文职人员培训规范》团体标准出版发行会暨橄榄枝大课堂上线发布会在北京举行
- 看我如何用多线程,帮助运营小姐姐解决数据校对系统变慢!
- SQL function TRIM
- 面积曲线AUC(area under curve)
- QT笔记——Q_PROPERTY了解
- 【kali-信息收集】(1.9)Metasploit+搜索引擎工具Shodan
猜你喜欢

The exchange - string dp

华为eNSP(基础实验通信)

jacoco的学习以及理解

细学常用类,集合类,IO流

“纯C”实现——三子棋小游戏
redis cluster cluster, the ultimate solution?
![[kali-information collection] (1.8) ARP reconnaissance tool _Netdiscover](/img/04/f477cd8726d147b892f6050d46c312.png)
[kali-information collection] (1.8) ARP reconnaissance tool _Netdiscover
[email protected] This version of tar is no longer supported, and will not receive"/>npm WARN deprecated [email protected] This version of tar is no longer supported, and will not receive

力扣27-移除元素——简单题

力扣58-左旋转字符串
随机推荐
力扣27-移除元素——简单题
微信小程序---组件开发与使用
Likou 35 - search for insertion position - binary search
go语言的接口
【2022 小目标检测综述】Towards Large-Scale Small Object Detection: Survey and Benchmarks
According to the field classification Golang map array
使用mosquitto过程中的问题解决
Shell编程之条件语句
npm WARN config global `--global`, `--local` are deprecated. Use `--location解决方案
华为eNSP(基础实验通信)
leetcode: 200. Number of islands
免费文档翻译-免费批量文档翻译软件推荐
半夜赶工制作简报的我好想说 : 确定了,最终稿就是这样
阿苹的思考
喜迎八一 《社会企业开展应聘文职人员培训规范》团体标准出版发行会暨橄榄枝大课堂上线发布会在北京举行
SQL 数据更新
服务器间传输文件
元宇宙“吹鼓手”Unity:疯狂扩局,悬念犹存
基于threejs的商品VR展示平台的设计与实现思路
翻译英语的软件-免费翻译软件-各种语言互相翻译