branchonline / yii2-unslider
Yii2 的 Unslider 小部件
4.0.0
2019-12-13 13:03 UTC
Requires
- yiisoft/yii2: *
README
Yii2 的 Unslider 滑块小部件
安装
将以下内容添加到您的 composer.json
文件的 require
部分
"branchonline/yii2-unslider": "*"
然后运行 composer install
。
用法
use branchonline\unslider\Unslider; echo Unslider::widget([ 'options' => [ 'nav' => false, 'keys' => true, 'fluid' => true ], 'slides' => [ [ 'img' => 'http://unslider.com/img/sunset.jpg', 'title' => 'Yii2 PHP Framework', 'body' => 'Unslider widget for Yii2', 'button' => ['title' => 'Title', 'href' => '#href', 'class' => 'btn'] ], [ 'img' => 'http://unslider.com/img/subway.jpg', 'title' => 'Another image', 'body' => 'description', 'button' => ['title' => 'Title', 'href' => '#href', 'class' => 'btn'] ] ]]);