Coder Social home page Coder Social logo

hitesh97 / wickedcss Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kristofferandreasen/wickedcss

0.0 3.0 0.0 1.28 MB

A library for CSS3 animations. The animations are more vibrant than most simple animations.

Home Page: http://kristofferandreasen.github.io/wickedCSS/

License: MIT License

CSS 29.72% HTML 69.30% JavaScript 0.98%

wickedcss's Introduction

wickedCSS

A library for CSS3 animations.

The animations include regular CSS3 animations to be used in all settings. Additionally, the library includes a number of wicked animations, which aren't applicable in all situations. They can be fun to play with.

For examples and documentation View Project Page.

Usage

To use the library, simply download and link to the file in your header.

<link rel="stylesheet" href="wickedcss.min.css"/>

Or the non-minified version.

<link rel="stylesheet" href="wickedcss.css"/>

Simply add the animation class to your element and it will perform your wicked animation.

<div class="barrelRoll"> Place your content here </div>

In this case, the contents of the div will perform the barrelRoll animation. All the classes can be found on the Project Page.

The classes can be applied to all elements including images.

<img src="images/mushroom.png" class="spinner"/>
Classes
  • floater
  • barrelRoll
  • rollerRight
  • rollerLeft
  • heartbeat
  • pulse
  • rotation
  • sideToSide
  • zoomer
  • zoomerOut
  • spinner
  • wiggle
  • shake
  • pound
  • slideUp
  • slideDown
  • slideRight
  • slideLeft
  • fadeIn
  • fadeOut
  • rotateInRight
  • rotateInLeft
  • rotateIn
  • bounceIn

Customizations

Show on scroll

In order to show the animations on scroll, the library can be integrated with wow.js. The animation will fire when the element enters the screen. Remember to include jQuery before wow.js like so:

Jquery with local fallback:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.3.min.js"><\/script>')</script>

wow.js

<script src="js/wow.min.js"></script>
<script>
new WOW().init();
</script>

It can be used like this:

<div class="wow barrelRoll"> Content to Reveal Here </div>
Show on scroll - Alternative

The animation can alternatively be triggered at a specific position. In this example it will be triggered when the element is 450 pixels from the top of the screen.

    <script>
    	$(window).scroll(function() {
    		$('#animatedElement').each(function(){
    		var imagePos = $(this).offset().top;
    
    		var topOfWindow = $(window).scrollTop();
    			if (imagePos < topOfWindow+450) {
    				$(this).addClass("barrelRoll");
    			}
    		});
    	});
    </script>

wickedcss's People

Contributors

kristofferandreasen avatar josephlin55555 avatar

Watchers

James Cloos avatar Hitesh avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.