Super Cool animation effects _jquery based on jquery and SVG

Source: Internet
Author: User

Today we are sharing a Web animation based on jquery and SVG super dazzle. The animation works very well. There are replay, slow, and reverse animation buttons below. The effect is very beautiful. Take a look at the effect chart:

The code that is implemented.

HTML code:

Copy Code code as follows:



<div id= "Intro" >


<svg xmlns= "Http://www.w3.org/2000/svg" xmlns:xlink= "Http://www.w3.org/1999/xlink"


Version= "1.1" id= "Ihtlogo" x= "0" y= "0" viewbox= "0 0 308.8 152.1" xml:space= "preserve"


enable-background= "New 0 0 308.8 152.1" >


<style>


. Tomatoleft,. tomatoright


{


Fill: #D74022;


}


. Bracketleft,. bracketright


{


Fill: #4D4D4F;


}


. s2


{


Fill:none;


Stroke-linecap:round;


Stroke-miterlimit:10;


Stroke-width:10;


Stroke: #FFF;


}


. tomatoleaves


{


Fill: #95D600;


}


</style>


<polygon points= "238.3 152.1 225.6 139.3 283.4 81.5 225.6 23.8 238.3 one 308.8 81.5" class= "Bracketright"/>


<polygon points= "70.5 152.1 0 81.5 70.5 83.2 23.8 25.5 81.5 83.2 139.3" class= "Bracketleft"/>


<g id= "Tomato" >


<path d= "M139.7 17.2c106 18.3 78.6 45.7 77.5 79.4 76.9 84.2 114.9 96.3 127l91-91c175.2 23.9 158.3 16.6 139.7 17.2z" class= "Tomatoleft"/>


<path d= "M122.3 127c12.1 12.1 19.4 47.6 18.8 33.7-1.1 61.1-28.5 62.2-62.2 0.6-18.6-6.7-35.5-18.8-47.6l122.3 127z" cl ass= "Tomatoright"/>


<path d= "M128.6 10.9c0-1.5 0-3 0.1-4.5 0.1-1.4 0.8-3.1 0.3-4.5-0.8-2.5-4.3-2.6-5.5-0.3-1.8 4.5-2.5 9.2-2.4 14-6.7 3. 2-17 2-24-0.2 5.1 4 11.2 6.7 18 7.5-6.5 3-12.5 7-17.6 11.9 13.7-9.2 32.4-7.6 44.4 3.7-1.3-4.6-3.5-8.7-6.4-12.3 7.3-5.2 1 6.3-7.4 25.1-6.3-7-2.1-14.2-3-21.5-2.8 3.2-2.1 6-4.7 8.3-7.7-6.3 3.5-11.4 4.1-18.5 4.4C128.8 13.2 128.7 11.6 128.6 10.9 " class= "Tomatoleaves"/>


</g>


</svg>


<svg xmlns= "Http://www.w3.org/2000/svg" xmlns:xlink= "Http://www.w3.org/1999/xlink"


Version= "1.1" id= "Ihttext" x= "0" y= "0" viewbox= "0 0 148.2" enable-background= "new 0 0 148.2 23"


Xml:space= "preserve" >


<path fill= "#D74022" d= "M5.3 18.5v19h3.7h-1h1.1v-0.4c0-0.2 0.1-0.4 0.4-0.4 0 0 0.1 0 0.1 0 0.1 0 0.2 0 0.4 0 0.2 0 0.4 0 0.7 0V8.9c-0.2 0-0.4 0-0.5 0 -0.2 0-0.3 0-0.3 0 -0.1 0-0.1 0-0.2 0 0 0-0.1 0-0.1 0 -0.3 0-0.4-0.1-0.4-0.4V8h1.6 1v10.1c0 .2 0 0.4 0 0.5 0 0.2 0 0.3 0 0.3 0 0.1 0 0.1 0 0.2 0 0 0 0.1 0 0.1 0c5.2 18.1 5.3 18.3 5.3 18.5zm2.3 4.6c2.3 4.5 2.2 4.4 2 .2 4.2c0-0.1 0-0.3 0.1-0.4 0.1-0.1 0.1-0.2 0.2-0.3 0.1-0.1 0.2-0.2 0.3-0.2s0.2-0.1 0.4-0.1c0.1 0 0.3 0 0.4 0.1 0.1 0.1 0.2 0.1 0.3 0.2c4 3.6 4.1 3.7 4.1 3.9 4.2 4 4.2 4.1 4.2 4.2c0 0.1 0 0.3-0.1 0.4c4.1 4.7 4 4.8 3.9 4.9 3.8 5 3.7 5.1 3.6 5.1 3 .5 5.2 3.3 5.2 3.2 5.2c-0.1 0-0.3 0-0.4-0.1s2.6 5 2.5 4.9 2.4 4.7 2.3 4.6z "/>


<path fill= "#D74022" d= "M14.9 7.6c1.2 0 2.1 0.4 2.8 1.2 0.6 0.8 1 1.8 1 3.1v5.5c0.7 0.1 1.1 0.2 1.3 0.3 0.2 0 0.3 0.2 0 .3 0.4v19h-3.5v-7.1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.6 0.2 1.3 0.2 1.8 0 .2 0.3 0 0.6 0 0.8-0.1 0.2-0.1 0.4-0.2 0.6-0.3 0.2-0.1 0.3-0.3 0.3-0.4 0.1-0.2 0.1-0.3 0.1-0.5 0-0.3-0.1-0.5-0.2-0.6-0.2- 0.2-0.4-0.3-0.6-0.4-0.3-0.1-0.6-0.2-0.9-0.3-0.3-0.1-0.7-0.2-1-0.3-0.3-0.1-0.7-0.3-1-0.4- 0.3-0.2-0.6-0.4-0.9-0.6-0.3-0.2-0.5-0.5-0.6-0.9-0.2-0.4-0.2-0.8-0.2-1.3 0-0.5 0.1-0.9 0.3-1.3s0.5-0.8 0.8-1.1c0.4-0.3 0.8-0.6 1.3-0.7s1.1-0.3 1.8-0.3c1.1 0 1.7 0.1 3.3 0.6v0 3.2h-0.1-0.3-0.9c-0.3 0-0.5-0.1-0.5-0.4. 1-0.4-0.1-1.2-0.3-0.1-0.8-0.1-1.3-0.1-0.5 0-1 0.1-1.3 0.3-0.3 0.2-0.5 0.5-0.5 0.9 0 0.2 0.1 0.4 0.2 0.6 0.2 0.2 0.4 0.3 0.6 0.4 0.3 0.1 0.6 0.2 0.9 0.3 0.3 0.1 0.7 0.2 1 0.3 0.3 0.1 0.7 0.3 1 0.4s0.6 0.3 0.9 0.6c0.3 0.2 0.5 0.5 0.6 0.8c146.9 14.5 147 14.9 147 15.4z "/>


</svg>


<ul class= "Buttons" >


<li><a id= "Btnplay" class= "button" href= "#" >replay</a></li>


<li><a id= "BTNSLOWMO" class= "button" href= "#" >slow motion</a></li>


<li><a id= "Btnreverse" class= "button" href= "#" >reverse</a></li>


</ul>


</div>


<script src= ' jquery.js ' ></script>


<script src= ' TweenMax.min.js ' ></script>


<script>


var tomato = $ (' #tomato '), Bracketright = $ ('. Bracketright '), Bracketleft = $ ('. Bracketleft '), Tomatoleft = $ ('. Tomatoleft '), Tomatoright = $ ('. Tomatoright '), Tomatoleaves = $ ('. Tomatoleaves '), letters = $ (' #ihtText path '), $btnPlay = $ (' #btnPl Ay '), $btnSlowMo = $ (' #btnSlowMo '), $btnReverse = $ (' #btnReverse '), TL;


TL = new Timelinemax ();


Tl.set ([Tomatoleft], {xpercent:23.6});


Tl.set ([tomatoleaves], {xpercent:41});


Tl.set ([tomato], {


Xpercent:2,


Rotation:13,


Transformorigin: ' Center center '


});


Tl.set (tomato, {ypercent:-200});


Tl.set (Bracketright, {xpercent:200});


Tl.set (Bracketleft, {xpercent:-200});


Tl.to ([


Bracketright,


Bracketleft


], 0.3, {


xpercent:0,


Ease:Power4.easeOut


}, 0.5). to (tomato, 0.5, {


ypercent:0,


Ease:Bounce.easeOut


}). to (tomato, 0.2, {


rotation:0,


Xpercent:-4


}). to ([


Tomatoleft,


Tomatoleaves


], 0.2, {xpercent:0}, ' split '). to (tomato, 0.2, {


rotation:0,


xpercent:0


}, ' split '). to (Tomatoright, 0.2, {xpercent:2}, ' split '). Staggerfrom (Letters, 0.01, {autoalpha:0}, 0.03). Add (' End ');


$btnPlay. Click (function () {


Tl.timescale (1). Seek (0);


});


$btnSlowMo. Click (function () {


Tl.timescale (0.2). Seek (0.5);


});


$btnReverse. Click (function () {


Tl.timescale (1). Seek ("end"). reverse ();


});


@ sourceurl=pen.js


</script>


CSS code:

Copy Code code as follows:



#intro


{


HEIGHT:100VH;


width:50%;


margin:0 Auto;


Overflow:hidden;


}


#intro #ihtLogo


{


Position:absolute;


top:50%;


left:50%;


height:100%;


width:50%;


Transform:translate (-50%,-70%);


}


#intro #ihtText


{


width:100%;


Position:absolute;


top:50%;


width:40%;


left:50%;


Transform:translate (-50%, 80%);


}


. Buttons


{


Position:absolute;


bottom:20px;


left:20px;


List-style:none;


margin:0;


padding:0;


right:20px;


}


. button


{


Float:left;


margin-right:10px;


padding:10px 15px;


border:1px #ebebeb Solid;


Text-decoration:none;


Color: #222222;


}


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.