Magic CSS3? Create various magical interactive animation effects_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:06:05
Original
1248 people have browsed it

Magic CSS3 Animations is a unique CSS3 animation effects package that you can freely use in your Web projects. Simply introduce the CSS style on the page: magic.css or the compressed version magic.min.css and you are ready to use. This project is now on GitHub, including bling, perspective, rotate, slide, tin, bomb and many other special effects.

How to use:

First introduce the style file:

<link rel="stylesheet" href="yourpath/magic.css">
Copy after login

Then add the class magictime and the animation class name to the element you want to animate, for example:

$('.yourdiv').hover(function () {  $(this).addClass('magictime puffIn');});
Copy after login

If you want to execute the animation after a certain period of time, you can write like this :

setTimeout(function(){    $('.yourdiv').addClass('magictime puffIn');}, 5000);
Copy after login

It is also possible to execute the animation in a loop:

setInterval(function(){     $('.yourdiv').toggleClass('magictime puffIn');}, 3000 );
Copy after login

You can also customize the execution time of the animation and modify the time. Parameters:

.magictime {	-webkit-animation-duration: 1s;	-moz-animation-duration: 1s;	-o-animation-duration: 1s;	animation-duration: 1s;}
Copy after login

If it is a modification for a specific animation effect, you can do this:

.magictime.magic {	-webkit-animation-duration: 10s;	-moz-animation-duration: 10s;	-o-animation-duration: 10s;	animation-duration: 10s;}
Copy after login

Download Now Online Demo

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!