很简单,html代码如下
<div class="slider__images"> <div class="slider__images-item slider__images-item--active" data-id="1"><img src="img/1.jpg"></div> <div class="slider__images-item" data-id="2"><img src="img/2.jpg"></div> <div class="slider__images-item" data-id="3"><img src="img/3.jpg"></div> <div class="slider__images-item" data-id="4"><img src="img/4.jpg"></div> <div class="slider__images-item" data-id="5"><img src="img/5.jpg"></div> </div>
相应加载css、js文件,图片地址放在对应div中 通过class控制,会出现轮播、3D切换特效