GithubHelp home page GithubHelp logo

yesiamrocks / cssanimation.io Goto Github PK

View Code? Open in Web Editor NEW
257.0 15.0 59.0 133 KB

CSS Animation Library for Developers and Ninjas

Home Page: https://cssanimation.io/

License: MIT License

CSS 63.02% JavaScript 36.98%
css-animations css animation web-animation transition css-hover-animation text-animation greensock css3-animations

cssanimation.io's Introduction

Getting started with cssanimation.io

GitHub license

In modern web concept, cssanimation.io is the best controlling animation library for CSS and GreenSock, Moving forward with this library, you need to have a basic idea on HTML and CSS3. We believe you have that. If you are pretty confused, just refreshing your idea from here to go along more easily.

This library is too easy to install and implement. Anything you can be done with our relevant animation class name. So Download and let’s get started with this library.

We also offer to you GreenSock animation, just fly over here to get the guideline.

To get started, from the outset you download the complete library or use a CDN hosted version by jsDelivr. All CDN URLs below:

Usage

  1. Include the cssanimation.css or cssanimation.min.css stylesheet into the head
<!DOCTYPE html>
<html lang="en">
<head> 
    <meta charset="UTF-8">
    <title>CSS Animation Library for Developers and Ninjas</title> 
    <link href="https://cdn.jsdelivr.net/gh/yesiamrocks/[email protected]/cssanimation.min.css" rel="stylesheet">
</head> 
<body> 

</body>
</html>
  1. Now add the class cssanimation and class of animation name like fadeIn for fade in animation to the element that you want to animate. For list of animation class name check out the home page
<!DOCTYPE html>
<html lang="en">
<head> 
    <meta charset="UTF-8">
    <title>CSS Animation Library for Developers and Ninjas</title> 
    <link href="https://cdn.jsdelivr.net/gh/yesiamrocks/[email protected]/cssanimation.min.css" rel="stylesheet">
</head> 
<body> 

   <h1 class="cssanimation fadeIn"> Example </h1> 

</body>
</html>
  1. And if you want letter animation, There are two versions here. One is the sequential and the other is random animation. Just add the file letteranimation.js before the body tag. Now add a letter animation class like leFadeIn for letter fade in animation then must be add sequential class for to get an animation in sequence or random class for animate randomly.
<!DOCTYPE html>
<html lang="en">
<head> 
    <meta charset="UTF-8">
    <title>CSS Animation Library for Developers and Ninjas</title> 
    <link href="https://cdn.jsdelivr.net/gh/yesiamrocks/[email protected]/cssanimation.min.css" rel="stylesheet">
</head> 
<body> 

   <h1 class="cssanimation leFadeIn sequence"> Example </h1>
   <h1 class="cssanimation leFadeIn random"> Example </h1>

   <script type="text/javascript" src=" https://cdn.jsdelivr.net/gh/yesiamrocks/[email protected]/letteranimation.min.js"></script>
</body>
</html>
  1. You may also want to include the class infinite for an infinite loop.
<!DOCTYPE html>
<html lang="en">
<head> 
    <meta charset="UTF-8">
    <title>CSS Animation Library for Developers and Ninjas</title> 
    <link href="https://cdn.jsdelivr.net/gh/yesiamrocks/[email protected]/cssanimation.min.css" rel="stylesheet">
</head> 
<body> 

   <h1 class="cssanimation fadeIn infinite"> Example </h1> 

   <script type="text/javascript" src=" https://cdn.jsdelivr.net/gh/yesiamrocks/[email protected]/letteranimation.min.js"></script>
</body>
</html>

Extremely light weight

Unlike all the other complicated vendors, our cssanimation.css is only 84kb with 300 animations, 165kb in the minified version with all prefix and only 10kb when compressed. And the letteranimation.js only 3kb, with 1kb in the minified version and only 0.6kb when compressed.

Hard to believe it!!! We know, Believe it!!!

Having trouble?

If cssanimation.io isn't doing what you expect it to please post a mail to [email protected] or create a issue

License

cssanimation.io is licensed under the MIT Licenses

cssanimation.io's People

Contributors

yesiamrocks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cssanimation.io's Issues

Plans to install it as npm package? Usage in react-way?

Awesome package!

I'm wondering whether it is in the todo list

  • to implement a yarn add way of installing it
  • to add some react way of using the library, something like
<FadeFromLeft>my awesome copy</FadeFromLeft>

Thanks πŸ™ŒπŸ™ŒπŸ™Œ

NPM

Hi, why is this library not published as an npm package?

innerHTML

the letter animation JS should be changed from getting the innerHTML to getting the innerText and filter out the tags that are not text as if you have let's say an icon in the div till be displayed with all the tags etc
I changed mine to this and works well (needs a bit tweaking it's just for the idea)

function animateSequence() {
    var a = $('.sequence');
    for (var i = 0; i < a.length; i++) {
        var $this = a[i];
        var letter = $('.sequence').not($('.sequence').children()).text()
        letter = letter.trim();
        var str = '';
        var delay = 100;
        for (l = 0; l < letter.length; l++) {
            if (letter[l] != ' ') {
                str += '<span style="animation-delay:' + delay + 'ms; -moz-animation-delay:' + delay + 'ms; -webkit-animation-delay:' + delay + 'ms; ">' + letter[l] + '</span>';
                delay += 150;
            } else
                str += letter[l];
        }
        $this.innerHTML = str;
    }
}

function animateRandom() {
    var a = $('.random');
    for (var i = 0; i < a.length; i++) {
        var $this = a[i];
        var letter = $('.random').not($('.random').children()).text()
        letter = letter.trim();
        var delay = 70;
        var delayArray = new Array;
        var randLetter = new Array;
        for (j = 0; j < letter.length; j++) {
            while (1) {
                var random = getRandomInt(0, (letter.length - 1));
                if (delayArray.indexOf(random) == -1)
                    break;
            }
            delayArray[j] = random;
        }
        for (l = 0; l < delayArray.length; l++) {
            var str = '';
            var index = delayArray[l];
            if (letter[index] != ' ') {
                str = '<span style="animation-delay:' + delay + 'ms; -moz-animation-delay:' + delay + 'ms; -webkit-animation-delay:' + delay + 'ms; ">' + letter[index] + '</span>';
                randLetter[index] = str;
            } else
                randLetter[index] = letter[index];
            delay += 80;
        }
        randLetter = randLetter.join("");
        $this.innerHTML = randLetter;
    }
}

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.