下载swiper
[https://www.swiper.com.cn/usage/index.html](https://www.swiper.com.cn/usage/index.html)
参考swiper
[https://blog.csdn.net/Flynn\_curry/article/details/90237934](https://blog.csdn.net/Flynn_curry/article/details/90237934)
## 1.0页面布局
```
<!DOCTYPE html>
<html>
<head>
<title>实用轮播图</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="./swiper.min.css">
<link rel="stylesheet" type="text/css" href="./test19.css">
<!--------- 引进自己 swiper插件------->
<script src="./swiper.min.js"></script>
</head>
<body>
<div class="lunbo-leave fluidwidth">
<div class="swiper-container swiper1-container">
<div class="swiper-wrapper">
<div class="swiper-slide"><img src="./images/lunbo-1.jpg" class="swiper-imagesize"></div>
<div class="swiper-slide"><img src="./images/lunbo-2.jpg" class="swiper-imagesize"></div>
<div class="swiper-slide"><img src="./images/lunbo-3.jpg" class="swiper-imagesize"></div>
<div class="swiper-slide"><img src="./images/lunbo-4.jpg" class="swiper-imagesize"></div>
<div class="swiper-slide"><img src="./images/lunbo-5.jpg" class="swiper-imagesize"></div>
<div class="swiper-slide"><img src="./images/lunbo-6.jpg" class="swiper-imagesize"></div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination swiper-p1"></div>
</div>
</div>
<div class="lunbo-leave fluidwidth">
<div class="swiper-container swiper2-container">
<div class="swiper-wrapper">
<div class="swiper-slide"><img src="./images/lunbo-1.jpg" class="swiper-imagesize"></div>
<div class="swiper-slide"><img src="./images/lunbo-2.jpg" class="swiper-imagesize"></div>
<div class="swiper-slide"><img src="./images/lunbo-3.jpg" class="swiper-imagesize"></div>
<div class="swiper-slide"><img src="./images/lunbo-4.jpg" class="swiper-imagesize"></div>
<div class="swiper-slide"><img src="./images/lunbo-5.jpg" class="swiper-imagesize"></div>
<div class="swiper-slide"><img src="./images/lunbo-6.jpg" class="swiper-imagesize"></div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination swiper-p2"></div>
</div>
</div>
<script type="text/javascript" src="./test19.js"></script>
</body>
</html>
```
## 2.0css样式
/*----------------------轮播图公共样式层-----------------------*/
.lunbo-leave {
}
.swiper-imagesize {
max-width: 1280px;
width: 100%;
min-width: 1100px;
/*height: 700px;*/
}
.swiper-wrapper {
max-width: 1280px;
width: 100%;
min-width: 1100px;
/*height: 700px;*/
}
.swiper-pagination-bullet-active {
background-color: #A0100F;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;
/* Center slide text vertically */
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
}
/*------------------------轮播图1层---------------------------*/
.swiper1-container {
max-width: 1280px;
width: 100%;
min-width: 1100px;
/*height: 700px;*/
}
/*------------------------轮播图2层---------------------------*/
.swiper2-container {
max-width: 1280px;
width: 100%;
min-width: 1100px;
/*height: 700px;*/
}
## 3.0js布局
```
var swiper1 = new Swiper('.swiper1-container', { // 区分容器
centeredSlides: true,
loop: true,
autoplay: {
delay: 2500,
disableOnInteraction: false,
},
pagination: {
el: '.swiper-p1',
clickable: true,
},
});
var swiper2 = new Swiper('.swiper2-container', { // 区分容器
effect: 'fade',
loop: true,
centeredSlides: true,
autoplay: {
delay: 2500,
disableOnInteraction: false,
},
pagination: {
el: '.swiper-p2',
clickable: true,
},
});
```
- tp5图片上传
- 文件上传到七牛云
- 上传到阿里云
- 富文本编辑器
- phpexcel和spreadsheet
- phpexcel导出
- phpexcel导入
- spreadsheet
- tp5_api接口
- 跨域请求
- JWT
- 图片和视频上传接口
- 验证码
- tp5小程序登录
- tp5小程序支付
- tp5基础架构
- 验证层
- 模型层Model
- 控制器构找
- tp5.0支付宝
- 海报二维码
- 轮播图
- echarts柱状图
- layui的图片弹窗
- p标签显示指定行数(全部)
- jquery和layerdate调用日期
- ajax发送文件和图片的坑啊
- JS日期点击上一天和下一天
- 百度分享js
- POST请求
- 商品数据表
- tp5.0支付宝最全
- tp5路由的坑
- 二维数组排序
- tp5模型分组group错误
- 二维变一维数组
- 无限树形结构
- json对象转数组
- 模型关联查询
- tp5的模型获取器和字段设定
- 经纬度获取距离排序