simplator/yii2-fancybox
最新稳定版本:v2.1.5
Composer 安装命令:
composer require simplator/yii2-fancybox
包简介
fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages.
README 文档
README
fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages. http://fancyapps.com/fancybox/
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist newerton/yii2-fancybox "dev-master"
or add
"simplator/yii2-fancybox": "dev-master"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
<?php echo newerton\fancybox\FancyBox::widget([ 'target' => 'a[rel=fancybox]', 'helpers' => true, 'mouse' => true, 'config' => [ 'maxWidth' => '90%', 'maxHeight' => '90%', 'playSpeed' => 7000, 'padding' => 0, 'fitToView' => false, 'width' => '70%', 'height' => '70%', 'autoSize' => false, 'closeClick' => false, 'openEffect' => 'elastic', 'closeEffect' => 'elastic', 'prevEffect' => 'elastic', 'nextEffect' => 'elastic', 'closeBtn' => false, 'openOpacity' => true, 'helpers' => [ 'title' => ['type' => 'float'], 'buttons' => [], 'thumbs' => ['width' => 68, 'height' => 50], 'overlay' => [ 'css' => [ 'background' => 'rgba(0, 0, 0, 0.8)' ] ] ], ] ]); echo Html::a(Html::img('/folder/thumb.jpg'), '/folder/imagem.jpg', ['rel' => 'fancybox']); ?>
Hint: Do not forget to declare the Html class at the top of the file.
use yii\helpers\Html;
统计信息
- 总下载量: 124
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-07-10