css-animation

css-animation

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
css-animation
2.0.44 years ago8 years agoMinified + gzip package size for css-animation in KB

Readme

css-animation

make css animation easier
!NPM versionnpm-imagenpm-url

Development

npm install
npm start

Example

http://localhost:6006/
online example: http://yiminghe.github.io/css-animation/

Feature

  • support ie8,ie8+,chrome,firefox,safari

install

css-animation

Usage

import anim from 'css-animation';
anim(el,animationName,function(){});

API

void anim(el:DOMElement, animationName:String, callback:Function)

<thead>
<tr>
    <th style="width: 100px;">name</th>
    <th style="width: 50px;">type</th>
    <th style="width: 50px;">default</th>
    <th>description</th>
</tr>
</thead>
<tbody>
    <tr>
      <td>el</td>
      <td>DOMElement</td>
      <td></td>
      <td>dom element to be animated</td>
    </tr>
    <tr>
      <td>animationName</td>
      <td>String|Object</td>
      <td></td>
      <td>will add animationName (if string) or animationName.name (if object) as class to el, then setTimeout 0 to add ${animationName}-active (if string) or animationName.active (if object) to el</td>
    </tr>
    <tr>
      <td>callback</td>
      <td>Function</td>
      <td></td>
      <td>triggered when anim caused by animationName is done</td>
    </tr>
</tbody>

License

css-animation is released under the MIT license.