swiper在一个页面多个轮播图
<script>
var swiper = new Swiper('.swiper-container1', {
spaceBetween: 30,
centeredSlides: true,
autoplay: {
delay: 2500,
disableOnInteraction: false,
},
pagination: {
el: '.swiper-pagination1',
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
});
</script>
<script>
var swiper2 = new Swiper('.swiper-container2', {
slidesPerView: 4,
spaceBetween: 30,
slidesPerGroup: 4,
loop: true,
autoplay: {
delay: 2500,
disableOnInteraction: false,
},
loopFillGroupWithBlank: true,
pagination: {
el: '.swiper-pagination2',
clickable: true,
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
});
</script>
注意: 千万不要直接更改swiper-container 应该在后面加上所起的名称
<div class="swiper-container swiper-container1">
<div class="swiper-wrapper">
<div class="swiper-slide"><img src="img/banner.png" width="100%"
height="328px"></div>
<div class="swiper-slide"><img src="img/banner.png" width="100%"
height="328px"></div>
<div class="swiper-slide"><img src="img/banner.png" width="100%"
height="328px"></div>
<div class="swiper-slide"><img src="img/banner.png" width="100%"
height="328px"></div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination swiper-pagination1"></div>
<!-- Add Arrows -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
<div class="swiper-container swiper-container2">
<div class="swiper-wrapper">
<div class="swiper-slide success-item"><img src="img/book3.png"></div>
<div class="swiper-slide success-item"><img src="img/biaozhi.png"></div>
<div class="swiper-slide success-item"><img src="img/biaozhi.png"></div>
<div class="swiper-slide success-item"><img src="img/biaozhi.png"></div>
<div class="swiper-slide success-item"><img src="img/biaozhi.png"></div>
<div class="swiper-slide success-item"><img src="img/book3.png"></div>
<div class="swiper-slide success-item"><img src="img/biaozhi.png"></div>
<div class="swiper-slide success-item"><img src="img/biaozhi.png"></div>
<div class="swiper-slide success-item"><img src="img/biaozhi.png"></div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination swiper-pagination2"></div>
<!-- Add Arrows -->
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
swiper在一个页面多个轮播图的更多相关文章
- swiper实现一个好看的轮播图
轮播是我们在编写页面中经常遇到的模块,所以网上也会有各种有有关轮播图的插件.今天忽然间看到了swiper上一个高颜值的轮播功能,顺便做一下分享. 首先页面在head内要先引用 swiper的css 和 ...
- 两个页面实现mui轮播图与选项卡结合
index.html页面 <!DOCTYPE html><html><head> <meta charset="utf-8"> &l ...
- Swiper 移动端全屏轮播图效果
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&quo ...
- reactjs-swiper react轮播图组件基于swiper
react轮播图组件基于swiper demo地址:http://reactjs-ui.github.io/reactjs-swiper/simple.html 1. 下载安装 npm install ...
- vue2 使用 swiper 轮播图效果
第一步.先安装swiper插件 npm install swiper@3.4.1 --save-dev 第二步.组件内引入swiper插件 import Swiper from 'swiper' im ...
- 原生JS面向对象思想封装轮播图组件
原生JS面向对象思想封装轮播图组件 在前端页面开发过程中,页面中的轮播图特效很常见,因此我就想封装一个自己的原生JS的轮播图组件.有了这个需求就开始着手准备了,代码当然是以简洁为目标,轮播图的各个功能 ...
- 【云开发】10分钟零基础学会做一个快递查询微信小程序,快速掌握微信小程序开发技能(轮播图、API请求)
大家好,我叫小秃僧 这次分享的是10分钟零基础学会做一个快递查询微信小程序,快速掌握开发微信小程序技能. 这篇文章偏基础,特别适合还没有开发过微信小程序的童鞋,一些概念和逻辑我会讲细一点,尽可能用图说 ...
- 微信小程序------轮播图
swiper 微信小程序实现轮播图,和网站,APP的效果差不多,代码少,效率高. 先来看看效果图: 主要用swiper + swiper-item来实现 <view class='swiper' ...
- element-ui中轮播图自适应图片高度
哈哈,久违了各位.我又回来了,最近在做毕设,所以难免会遇到很多问题,需要解决很多问题,在万能的博友帮助下,终于解决了Element-ui中轮播图的图片高度问题,话不多说上代码. 那个axios的使用不 ...
随机推荐
- [期望DP][纪中]【2010集训队出题】彩色圆环
彩色圆环 感谢名单 十分感谢 JA_Ma 为我讲解了 \(T1\) 的 期望DP 的思想和推论. 十分感谢 SSL_LYF 为我解答了 \(T1\) 的 期望DP 的概率的大小问题. 十分感谢 SSL ...
- Lesson 12 Life on a desert island
Lesson 12 Life on a desert island desert island ['dezət 'ailənd] n. 荒岛 uninhabited island coral isla ...
- 【动态规划】合唱队形 luogu-
分析 做两遍最长上升子序列,在遍历一下,取最大值. AC代码 #include <bits/stdc++.h> using namespace std; #define ms(a,b) m ...
- 【模拟】玩具谜题 luogu-1563
题目描述 小南有一套可爱的玩具小人, 它们各有不同的职业. 有一天, 这些玩具小人把小南的眼镜藏了起来. 小南发现玩具小人们围成了一个圈,它们有的面朝圈内,有的面朝圈外.如下图: 这时singer告诉 ...
- 13Java进阶——IO、线程
1 字节缓冲流 BufferInputStream 将创建一个内部的缓冲区数组,内部缓冲区数组将根据需要从包含的输入流中重新填充,一次可以读取多个字节 BufferOutputStream 该类实现缓 ...
- Android开发在Activity外申请权限调用相机打开相册
问题描述: 最近在项目中遇到一个需要调用相册和打开相机的需求,但是,在Android 6.0以后,调用相册属于危险权限,需要开发者动态获取,这就意味着我们申请权限是与Activity绑定的,但如果一个 ...
- PHP:字符串转数组,数组转字符串;字符串截取、替换、查找
字符串转数组$str = 'one|two|three|four'; print_r(explode('|', $str)); //explode 以字符串分割字符串到数组 $str = 'one t ...
- CS229 斯坦福大学机器学习复习材料(数学基础) - 线性代数
CS229 斯坦福大学机器学习复习材料(数学基础) - 线性代数 线性代数回顾与参考 1 基本概念和符号 1.1 基本符号 2 矩阵乘法 2.1 向量-向量乘法 2.2 矩阵-向量乘法 2.3 矩阵- ...
- shell脚本(14)-正则表达式
一.正则表达式介绍 正则表达式是一种文本模式匹配,包括普通字符(a...z)和特殊字符(元字符). 它是一种字符串匹配模式,可以用来检查一个字符串是否含有某种子串.将匹配的子串替换或者从某个字符串中取 ...
- HCNA Routing&Switching之GVRP
前文我们了解了不同vlan间路由相关话题,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/15110336.html,今天我们来聊一聊vlan动态注册相关话题: ...