zhangjian180 / yii2-carousel
Bootstrap carousel widget for Yii 2 framework
Installs: 15
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
This package is not auto-updated.
Last update: 2025-06-14 17:38:36 UTC
README
支持单个或多个(列表)多图轮播展示小部件
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist zhangjian180/yii2-carousel "*"
or add
"zhangjian180/yii2-carousel": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?= \zhangjian180\carousel\Carousel::widget([ 'imagesData' => ['http://...01.png', 'http://...02.png'], 'imagesConfig' => [ 'width' => '104', 'height' => '40' ], /* 默认图 */ 'defaultDataSrc' => 'holder.js/104x40', 'myCarouselIdName' => 'myCarousel', 'myCarouselStyle' => 'width:104px !important; margin:0 auto;' ]); ?>```