# 3d
```
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/css/swiper.min.css">
<style>
.swiper-container{
height: 300px;
width: 500px;
}
.swiper-slide{
height: 300px;
width: 250px;
border:1px solid #ccc;
}
.red{
background: red;
}
.green{
background: green;
}
.blue{
background: blue;
}
.orange{
background: orange;
}
.pink{
background: pink;
}
</style>
</head>
<body>
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide red"></div>
<div class="swiper-slide green"></div>
<div class="swiper-slide blue"></div>
<div class="swiper-slide orange"></div>
<div class="swiper-slide pink"></div>
</div>
<div class="swiper-pagination"></div>
</div>
<div class="swiper-container2">
<div class="swiper-wrapper">
<div class="swiper-slide red"></div>
<div class="swiper-slide green"></div>
<div class="swiper-slide blue"></div>
<div class="swiper-slide orange"></div>
<div class="swiper-slide pink"></div>
</div>
<div class="swiper-pagination"></div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/3.4.2/js/swiper.min.js"></script>
<script>
var swiper = new Swiper('.swiper-container',{
pagination:'.swiper-pagination',
loop:true,
//autoplay:1000,
//grabCursor:true,
centeredSlides:true,
slidesPerView:'auto',
effect:'coverflow',
coverflow:{
rotate:0,//滑动时旋转角度
stretch:100,//聚合宽度
depth:100,//景深
modifier:1,//覆盖叠加层数
slideShadows:false//是否阴影
}
});
</script>
<script>
var swper2 = new Swiper('.swiper-container2', {
direction: 'horizontal',
spaceBetween : 10,
loop: true,
slidesPerView : 1.2,
centeredSlides : true
});
</script>
</body>
</html>
————————————————
版权声明:本文为CSDN博主「weixin_41978390」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_41978390/article/details/79977107
```
- Swiper
- 01-Swiper简介
- 02-Swiper初体验
- 03-分页器
- 04-前进后退按钮,上一张下一张切换
- 05-滚动条
- 06-自动播放
- 07-无缝轮播
- 08-键盘控制
- 09-鼠标滚轮
- 10-切换效果
- 01-effects
- 02-fadeEffect-淡入淡出
- 03-cubeEffect-一般用于广告
- 04-coverflowEffect相册作品展示
- 05-flipEffect-旋转门
- 11-拓展
- 12-Swiper+Animate.css
- 13-视差拓展
- 14-virtual
- 15-图片懒加载
- 01-loadPrevNext
- 02-loadPrevNextAmount
- 03-loadOnTransitionStart
- 04-elementClass
- 16-3d