drmabuse/yii2-slick-carousel
Composer 安装命令:
composer require drmabuse/yii2-slick-carousel
包简介
the last carousel you'll ever need
README 文档
README
the Preview http://kenwheeler.github.io/slick/
The yii2 widget to the fantastic slick-carousel. This widget generate you the only the javascript.
###Installation Composer drmabuse/yii2-slick-carousel:"*"
Installation Assets Bower
cd vendor/drmabuse/yii2-slick-carousel/web
bower install
###Using
\drmabuse\slick\SlickWidget::widget([
'container' => '.single-item',
'settings' => [
'slick' => [
'infinite' => true,
'slidesToShow' => 3,
'onBeforeChange'=> new \yii\web\JsExpression('function(){
}'),
'onAfterChange' => new \yii\web\JsExpression('function(){
console.debug(this);
}'),
'responsive' => [
[
'breakpoint'=> 768,
'settings'=> [
'arrows'=> false,
'centerMode'=> true,
'centerPadding'=> 40,
'slidesToShow'=> 3
]
]
],
],
'slickGoTo' => 3,
]
]);
<div class="slider single-item">
<div><h3>1</h3></div>
<div><h3>2</h3></div>
<div><h3>3</h3></div>
<div><h3>4</h3></div>
<div><h3>5</h3></div>
<div><h3>6</h3></div>
</div>
统计信息
- 总下载量: 15.06k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-04-07