Magic CSS3 animation is a uniqueCSS3Animation special effect package, you can freely use yourWebProject. You can simply introduce the CSS style: magic.css or the compressed version magic.min.css on the page. This project is now available on GitHub, including bling, perspective, rotate, slide, tin, bomb, and many other special effects.
Articles you may be interested in
- Codrops Tutorial: full-screen webpage transition effect based on CSS3
- Zoom. js: share a unique page content scaling plug-in
- Codrops Tutorial: exquisite mode window effect based on CSS3
- Debuggex-Excellent visual debugging tool for Regular Expression
- Zepto. js-a lightweight JavaScript library for modern browsers
Then add the magictime class and the animation class name to the element you want to implement the animation effect, for example:
$('.yourdiv').hover(function () { $(this).addClass('magictime puffIn');});
If you want to execute an animation after a certain time, you can write it as follows:
setTimeout(function(){ $('.yourdiv').addClass('magictime puffIn');}, 5000);
Loop animation execution is also possible:
setInterval(function(){ $('.yourdiv').toggleClass('magictime puffIn');}, 3000 );
You can also customize the animation execution time by modifying the time parameter:
.magictime {-webkit-animation-duration: 1s;-moz-animation-duration: 1s;-o-animation-duration: 1s;animation-duration: 1s;}
You can modify the animation effect as follows:
.magictime.magic {-webkit-animation-duration: 10s;-moz-animation-duration: 10s;-o-animation-duration: 10s;animation-duration: 10s;}
Articles you may be interested in
- CSS Matic: The ultimate CSS toolbox essential to web designers
- Front-end digest-practical tools and tips for optimizing Web Images
- Feedly: an alternative to Google Reader's best RSS Reader
- Swipebox-jQuery Lightbox plug-in for touch screen
- CSS beau-a convenient online CSS code beautification Tool
Link to this article: Magic CSS3-creating various magical Interactive Animation Effects
Source: Dream sky ◆ focus on front-end development technology ◆ share web design resources
Source of this article [http://www.cnblogs.com/lhb25 /]