Author: | usablica |
---|---|
Views Total: | 735 views |
Official Page: | Go to website |
Last Update: | August 10, 2016 |
License: | MIT |
Preview:

Description:
kissui.scrollanim is a lightweight and zero-dependency JavaScript library that allows you to add 75+ CSS3 powered animations to a certain element depending on its current position relative to the browser window when scrolling.
How to use it:
Add the scrollanim.min.css and scrollanim.min.js into your webpage.
<link rel="stylesheet" href="build/scrollanim.min.css"> <script src='build/scrollanim.js'></script>
Use the ‘data-kui-anim’ attribute to specify the animation type when the element is scrolled into view.
<div data-kui-anim="fadeIn">Show this with fade-in</div>
Or use JavaScript as follow:
kissuiScrollAnim.add(element, { 'in': 'fadeIn' });
Determine at which position should trigger the animation.
/* in - in the viewport out - ot in the viewport middle - center aligned element (vertically) center - center aligned element (horizontally) top - at the top of the page bottom - at the bottom of the page left - at the left side of the page right - at the right side of the page */ kissuiScrollAnim.add(element, { 'center middle': 'fadeIn' });
Animations supported:
- bounce
- flash
- pulse
- rubberBand
- shake
- headShake
- swing
- tada
- wobble
- jello
- bounceIn
- bounceInDown
- bounceInLeft
- bounceInRight
- bounceInUp
- bounceOut
- bounceOutDown
- bounceOutLeft
- bounceOutRight
- bounceOutUp
- fadeIn
- fadeInDown
- fadeInDownBig
- fadeInLeft
- fadeInLeftBig
- fadeInRight
- fadeInRightBig
- fadeInUp
- fadeInUpBig
- fadeOut
- fadeOutDown
- fadeOutDownBig
- fadeOutLeft
- fadeOutLeftBig
- fadeOutRight
- fadeOutRightBig
- fadeOutUp
- fadeOutUpBig
- flipInX
- flipInY
- flipOutX
- flipOutY
- lightSpeedIn
- lightSpeedOut
- rotateIn
- rotateInDownLeft
- rotateInDownRight
- rotateInUpLeft
- rotateInUpRight
- rotateOut
- rotateOutDownLeft
- rotateOutDownRight
- rotateOutUpLeft
- rotateOutUpRight
- hinge
- rollIn
- rollOut
- zoomIn
- zoomInDown
- zoomInLeft
- zoomInRight
- zoomInUp
- zoomOut
- zoomOutDown
- zoomOutLeft
- zoomOutRight
- zoomOutUp
- slideInDown
- slideInLeft
- slideInRight
- slideInUp
- slideOutDown
- slideOutLeft
- slideOutRight
- slideOutUp
nice! thanks