swiper 轮播图插件
来源:互联网 发布:淘宝心选没有彩虹系统 编辑:程序博客网 时间:2024/05/14 19:58
一个不错的轮播插件
官网:
http://www.swiper.com.cn/
demo:
1 . 引入swiper.css文件和swiper.js 文件 (或者依赖jQuery的swiper.jquery.min.js)
2. 写入相应的html.(这里面有volist是thinkPHP遍历用的,里面是展示的图片)
<div class="swiper-container" style="height: 180px;"> <div class="swiper-wrapper"> <volist name="lunbojson" id="vo"> <div class="swiper-slide"> <a href="{pigcms:$vo['url']}"> <img src="{pigcms:$vo['img']}"> </a> <p class="swiper-title-mps">{pigcms:$vo['title']}</p> </div> </volist> </div> <!-- 如果需要分页器 --> <div class="swiper-pagination"></div></div>
3 . 初始化轮播
//定义轮播var mySwiper = new Swiper ('.swiper-container', { initialSlide :0,//初始化索引--就是从第几哥图开始播放 autoplay: swipertime,//可选选项,自动滑动 autoplayDisableOnInteraction : false,//操作之后还会不会继续自动滚动 direction: 'horizontal',//horizontal--横向 vertical--纵向 loop: true, effect : 'slide',//切换效果 --coverflow、cube、flip\fade\slide(默认) pagination: '.swiper-pagination', // 如果需要分页器 })
需要样式上的修改可以自己定义。
阅读全文
0 0
- 轮播图插件swiper
- swiper 轮播图插件
- swiper插件
- Swiper 插件
- swiper插件
- swiper插件
- vue-awesome-swiper(轮播图vue插件)
- Swiper 滑动插件
- swiper 插件应用!
- swiper.js插件使用
- 实用型插件-swiper
- vue引入swiper插件
- 如何使用插件 Swiper
- swiper.min.js插件
- jQuery.swiper插件
- 前端插件之-swiper
- swiper轮播图插件http://www.swiper.com.cn/api/pagination/2014/1217/68.html
- swiper插件制作轮播图swiper2.x和3.x差别
- Sicily 1198 Substring
- html标签里的onclick的时候总是报错:Uncaught ReferenceError: dosave is not defined(…)
- Hadoop2.7.1 集群环境搭建(虚拟机)
- 写出高转化率文案的三步骤
- [转]教你如何自己搭建vps,10M宽带用ss看youtube 1080p无压力!!
- swiper 轮播图插件
- linux系统更改网卡信息,将IP地址设置为固定IP
- Django 小结一
- Error:Execution failed for task ':app:processDebugResources'.
- Linux服务器离线安装xgboost
- Java Web 项目中的配置文件路径
- BZOJ 4670 佛罗里达
- Makefile笔记02之error:***commands commence before first target. stop
- 关于android指纹识别兼容6.0以下版本