Skip to content

forever97/Swiper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Swiper

轮播图插件

  1. 首先需要在html文档中引入swiper插件
<script src="swiper.js"></script>
  1. 创建一个div元素,名字自定 (插件参数中需要配置)
<div id="swiper"></div>
  1. 然后可以使用Swiper对象创建轮播图,使用者需要配置对应的参数:
参数 含义
name 创建的div对应的名字
color 边框的颜色
imgs 轮播图片地址
height/width 轮播图框的高/宽

使用的样例如下

<script type="text/javascript">
    var swiper = new Swiper({
        name: "#swiper",
        color: "gold",
        imgs: ['img/1.png', 'img/2.png', 'img/3.png', 'img/4.png', 'img/5.png'],
        height: 300,
        width: 500
    })
</script>

About

轮播图插件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors