xj / yii2-mosaic-widget
yii2-mosaic-widget
1.0.3
2015-03-06 08:14 UTC
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-09-10 19:41:54 UTC
README
https://github.com/buildinternet/mosaic
composer.json
"require": { "xj/yii2-mosaic-widget": "*" },
视图
use xj\mosaic\Mosaic; Mosaic::widget(['selector' => '.circle', 'options' => ['opacity' => 0.8]]); Mosaic::widget(['selector' => '.fade']); Mosaic::widget(['selector' => '.bar', 'options' => ['animation' => 'slide']]); Mosaic::widget(['selector' => '.bar2', 'options' => ['animation' => 'fade']]); Mosaic::widget(['selector' => '.bar3', 'options' => [ 'animation' => 'slide', 'anchor_y' => 'top' ]]); Mosaic::widget(['selector' => '.cover', 'options' => [ 'animation' => 'slide', 'anchor_x' => '400px' ]]); Mosaic::widget(['selector' => '.cover2', 'options' => [ 'animation' => 'slide', 'anchor_y' => 'top', 'hover_y' => '80px' ]]); Mosaic::widget(['selector' => '.cover3', 'options' => [ 'animation' => 'slide', 'anchor_x' => '400px', 'hover_y' => '300px' ]]);
选项
animation : 'fade',
speed : 150,
opacity : 1,
preload : 1,
anchor_x : 'bottom',
anchor_y : 'left',
hover_x : '0px',
hover_y : '0px'