VictorOrozco / yii2-owlcarousel2
适配于yii2框架的轮播图
dev-master
2018-04-30 03:26 UTC
Requires
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-24 18:43:23 UTC
README
适配于yii2框架的轮播图
动画
Owl Carousel
安装
安装此扩展的首选方法是通过 composer。
运行以下命令之一
php composer.phar require --prefer-dist victororozco/yii2-owlcarousel2 "*"
或在您的 composer.json
文件的 require 部分添加
"victororozco/yii2-owlcarousel2": "*"
使用方法
一旦安装了扩展,只需在代码中使用它即可
use victororozco\owlcarousel\OwlCarousel; <?php OwlCarousel::begin([ 'item' => 1, 'loop' => true, 'margin' => 10, 'autoplay' => true, 'animateIn' => 'fadeInLeft', 'animateOut' => 'slideOutDown', ]); ?> <div class="item"> <img src="https://lorempixel.com/1024/480/technics/5/" /> </div> <div class="item"> <img src="https://lorempixel.com/1024/480/technics/2/" /> </div> <div class="item"> <img src="https://lorempixel.com/1024/480/technics/3/" /> </div> <?php OwlCarousel::end(); ?>