lantongxue / yii2-swiper
Swiper 滑块组件的 Yii2 扩展
2.0.4
2018-10-11 07:43 UTC
Requires
- php: >=5.4.0
- bower-asset/swiper: >=v3.0.4
- fxp/composer-asset-plugin: >=1.0.0
- yiisoft/yii2: 2.0.*@dev
Requires (Dev)
- phpunit/phpunit: 4.8.x-dev
README
Yii2 滑块组件。更多信息请参阅:https://github.com/nolimits4web/Swiper/。
您可以在 demos 文件夹中找到示例。
您还可以阅读 文档。
安装
您可以通过 Composer 获取此扩展。
在终端中运行
$ php composer.phar require "lantongxue/yii2-swiper" "*"
或添加
"lantongxue/yii2-swiper" : "*"
到您的应用 composer.json
文件的 require 部分。
###用法
<?php /** * @var \yii\web\View $this */ use lantongxue\yii2\swiper\Swiper; echo Swiper::widget( [ 'items' => [ [ 'background' => 'http://lorempixel.com/600/600/nature/1' ], [ 'background' => 'http://lorempixel.com/600/600/nature/2' ], [ 'background' => 'http://lorempixel.com/600/600/nature/3' ], [ 'background' => 'http://lorempixel.com/600/600/nature/4' ], [ 'background' => 'http://lorempixel.com/600/600/nature/5' ] ], 'behaviours' => [ 'pagination' ], 'pluginOptions' => [ 'grabCursor' => true, 'centeredSlides' => true, 'slidesPerView' => 'auto', 'effect' => 'coverflow', 'coverflow' => [ 'rotate' => 50, 'stretch' => 0, 'depth' => 100, 'modifier' => 1, 'slideShadows' => true ] ] ] );
问题
如果出现问题,您可以通过 问题 创建。
感谢您的关注。