承接 simialbi/yii2-animate 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

simialbi/yii2-animate

最新稳定版本:1.0

Composer 安装命令:

composer require simialbi/yii2-animate

包简介

animate.css from daneden for usage in yii framework

README 文档

README

This extension integrates daneden's animate.css into yii2 framework.

Resources

Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require --prefer-dist simialbi/yii2-animate

or add

"simialbi/yii2-animate": "*"

to the require section of your composer.json

Usage

Register asset bundle

Either register in view (for example: @app/views/layouts/main.php)

<?php
/* @var $this \yii\web\View */
use simialbi\yii2\animatecss\AnimateCssPluginAsset;

AnimateCssPluginAsset::register($this);

or add the following to your assets/AppAsset.php

<?php
class AppAsset extends \yii\web\AssetBundle {
	public $depends = [
		'simialbi\yii2\animatecss\AnimateCssPluginAsset',
	];
}

Example Usage

Via data attributes

In your view use it like this:

<?php
/* @var $this \yii\web\View */

$this->title = 'My Yii Application';
?>
<div class="site-index">
    <div class="jumbotron" data-animation="tada">
		<h1>Congratulations!</h1>
 
		<p class="lead">You have successfully created your Yii-powered application.</p>
		
		<p>
			<a class="btn btn-lg btn-success" href="http://www.yiiframework.com">Get started with Yii</a>
		</p>
	</div>
</div>

Via java script

In your view use it like this:

<?php
/* @var $this \yii\web\View */

$this->title = 'My Yii Application';
?>
<div class="site-index">
    <div class="jumbotron">
		<h1>Congratulations!</h1>
 
		<p class="lead">You have successfully created your Yii-powered application.</p>
		
		<p>
			<a class="btn btn-lg btn-success" href="http://www.yiiframework.com">Get started with Yii</a>
		</p>
	</div>
</div>
<?php
	$this->registerJs("jQuery('.jumbotron').animateCss('tada')");
?>

For more information see official animate.css documentation.

License

yii2-animate is released under MIT license. See bundled LICENSE for details.

统计信息

  • 总下载量: 1.81k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 2
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-09-13