VictorOrozco/yii2-owlcarousel2

适配于yii2框架的轮播图

安装: 10

依赖者: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 0

开放问题: 0

类型:yii2-extension

dev-master 2018-04-30 03:26 UTC

This package is not auto-updated.

Last update: 2024-09-24 18:43:23 UTC


README

适配于yii2框架的轮播图

动画

animated.css

Owl Carousel

owl.carousel.js

安装

安装此扩展的首选方法是通过 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(); ?>