多种swiper轮播轮换效果全集
代码语言:html
所属分类:幻灯片
代码描述:多种swiper轮播轮换效果全集
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>swiper轮播合集</title>
<link type="text/css" rel="stylesheet" href="http://repo.bfw.wiki/bfwrepo/css/swiper.5.3.8.css">
<script type="text/javascript" src="http://repo.bfw.wiki/bfwrepo/js/swiper.5.3.8.js"></script>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
p {
text-align: center;
}
img {
width: 43.75rem;
height: 18.125rem;
}
.swiper-container {
width: 43.75rem;
height: 18.125rem;
margin: 0 auto;
}
.swiper-button-next {
right: 20px;
left: auto;
}
.swiper-button-prev {
left: 20px;
right: auto;
}
/* css定义分页,导航按钮颜色 */
#case5 {
--swiper-theme-color: #ff6600;
--swiper-pagination-color: #00ff33;
/* 两种都可以 */
}
#case6 img,#case7 img {
transform: scale(0.7);
}
#case7 {
width: auto;
}
</style>
</head>
<body>
<p>
水平切换
</p>
<div class="swiper-container" id="case1">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90" />
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90" />
</div>
</div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
<div class="swiper-pagination"></div>
<div class="swiper-scrollbar"></div>
</div>
<p>
垂直切换
</p>
<div class="swiper-container" id="case2">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90" />
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90" />
</div>
</div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
<div class="swiper-pagination"></div>
<div class="swiper-scrollbar"></div>
</div>
<p>
视差轮播
</p>
<div class="swiper-container" id="case3">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90" data-swiper-parallax-scale="0.15" data-swiper-parallax-opacity="0.5">
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90" data-swiper-parallax-scale="0.15" data-swiper-parallax-opacity="0.5">
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90" data-swiper-parallax-scale="0.15" data-swiper-parallax-opacity="0.5">
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90" data-swiper-parallax-scale="0.15" data-swiper-parallax-opacity="0.5">
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90" data-swiper-parallax-scale="0.15" data-swiper-parallax-opacity="0.5">
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90" data-swiper-parallax-scale="0.15" data-swiper-parallax-opacity="0.5">
</div>
</div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
<div class="swiper-pagination"></div>
<div class="swiper-scrollbar"></div>
</div>
<p>
幻灯片
</p>
<div class="swiper-container" id="case4">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90">
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90">
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90">
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90">
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90">
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90">
</div>
</div>
<div class="swiper-button-prev"></div>
<div class="swiper-button-next"></div>
<div class="swiper-pagination"></div>
<div class="swiper-scrollbar"></div>
</div>
<p>
渐变轮播
</p>
<div class="swiper-container" id="case5">
<div class="swiper-wrapper">
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90" data-swiper-parallax-scale="1.15">
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae508.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_450,h_177,/quality,q_90" data-swiper-parallax-scale="1.15">
</div>
<div class="swiper-slide">
<img src="http://repo.bfw.wiki/bfwrepo/image/5e0c6f2cae50.........完整代码请登录后点击上方下载按钮下载查看
网友评论0