ramzyvirani/yii2-lightbox
最新稳定版本:1.1
Composer 安装命令:
composer require ramzyvirani/yii2-lightbox
包简介
Lightbox widget for Yii2
README 文档
README
- Lightbox widget based on Lightbox2 extension http://lokeshdhakar.com/projects/lightbox2/
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist ramzyvirani/yii2-lightbox "*"
or add
"ramzyvirani/yii2-lightbox": "*"
to the require section of your composer.json.
Usage
Once the extension is installed, simply add widget to your page as follows:
echo Lightbox::widget([ 'files' => [ [ 'thumb' => 'url/to/thumb.ext', 'original' => 'url/to/original.ext', 'title' => 'optional title', ], ] ]);
To add html options you can use below syntax
echo Lightbox::widget([ 'files' => [ [ 'thumb' => [ 'src'=>'url/to/thumb.ext', 'htmlOptions' => ['class'=>'col-md-12', 'alt'=>'Alternate Text'] // These options will be applied to Image tag. ], 'original' => [ 'src' => 'url/to/original.ext', ] 'title' => 'optional title', ], ] ]);
统计信息
- 总下载量: 411
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2015-10-16