Animate.css make adding CSS animations as easy as drinking water

Source: Internet
Author: User

Animate.css is a bunch of cool, fun, cross-browser animation libraries that you can use in your projects at your own discretion. Use it anywhere you want to highlight, such as the home page, slider, which is as easy as drinking water and is a dead fan.

Usage

Using ANIMATE.CSS on your site, simply insert the stylesheet into <HEAD> in the document and add a CSS class name to the element that needs animation, as well as the name of the animation. That's it! You'll have a CSS animation effect. Super strong!

Note * Example

When combined with jquery, you can decide when to enable these animations and add animations using jquery dynamically, and you can do more things:

$ (' #yourElement '). AddClass (' animated bounceoutleft ');

You can also detect end-of-animation events:

$ (' #yourElement '). One (' Webkitanimationend mozanimationend msanimationend oanimationend animationend ', dosomething);

Note: Jquery.one () performs event processing at most once. Click here to learn more.

You can change the duration of the animation, increase the delay, or change the display count:

#yourElement {-vendor-animation-duration:3s;  -vendor-animation-delay:2s; -vendor-animation-iteration-count:infinite;}

Note: Be sure to replace "vendor" with the prefix of CSS Tian (WebKit, Moz, etc.)

Custom Build (Build)

ANIMATE.CSS supports grunt, you can easily create a custom build process. First, you need grunt and other dependencies:

$ cd path/to/animate.css/$ sudo npm install

Next, run grunt Watch to change and compile your custom build file. For example, you only need a subset of animation effects, just edit the Animate-config.json file and select the animation you need to use.

"Attention_seekers": {"Bounce": true, "flash": false, "pulse": false, "shake": true, "Swing": True, "Tada": true, "Wobble": true}

Website address: http://daneden.github.io/animate.css/


This article is from the "Liu Bofang blog" blog, make sure to keep this source http://liubofang.blog.51cto.com/11162557/1854060

Animate.css make adding CSS animations as easy as drinking water

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.