Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

3 лет назад
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. # css-animation
  2. ---
  3. make css animation easier
  4. [![NPM version][npm-image]][npm-url]
  5. [npm-image]: http://img.shields.io/npm/v/css-animation.svg?style=flat-square
  6. [npm-url]: http://npmjs.org/package/css-animation
  7. ## Development
  8. ```
  9. npm install
  10. npm start
  11. ```
  12. ## Example
  13. http://localhost:9001/examples/
  14. online example: http://yiminghe.github.io/css-animation/
  15. ## Feature
  16. * support ie8,ie8+,chrome,firefox,safari
  17. ## install
  18. [![css-animation](https://nodei.co/npm/css-animation.png)](https://npmjs.org/package/css-animation)
  19. ## Usage
  20. ```js
  21. var anim = require('css-animation');
  22. anim(el,animationName,function(){});
  23. ```
  24. ## API
  25. ### void anim(el:DOMElement, animationName:String, callback:Function)
  26. <table class="table table-bordered table-striped">
  27. <thead>
  28. <tr>
  29. <th style="width: 100px;">name</th>
  30. <th style="width: 50px;">type</th>
  31. <th style="width: 50px;">default</th>
  32. <th>description</th>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. <tr>
  37. <td>el</td>
  38. <td>DOMElement</td>
  39. <td></td>
  40. <td>dom element to be animated</td>
  41. </tr>
  42. <tr>
  43. <td>animationName</td>
  44. <td>String|Object</td>
  45. <td></td>
  46. <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>
  47. </tr>
  48. <tr>
  49. <td>callback</td>
  50. <td>Function</td>
  51. <td></td>
  52. <td>triggered when anim caused by animationName is done</td>
  53. </tr>
  54. </tbody>
  55. </table>
  56. ## Test Case
  57. ```
  58. npm test
  59. npm run chrome-test
  60. ```
  61. ## Coverage
  62. ```
  63. npm run coverage
  64. ```
  65. open coverage/ dir
  66. ## License
  67. css-animation is released under the MIT license.