Twitter Heart Animation Button :

<html> <head> <script src = "https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js" ></script> <style> . heart { width : 100px ; height : 100px ; position : absolute ; left : 50 %; top : 50 %; transform : translate (- 50 %, - 50 %); background : url ( heart . png ) no - repeat ; cursor : pointer ; } . heart - blast { background - position : - 2800px 0 ; transition : background 1s steps ( 28 ); } </style> <script> $ ( function () { $ ( ".heart" ). on ( "click" , function () { $ ( this ). toggleClass ( "heart-blast" ); }); }); </script> </head> <body> <div class = "heart" ></div> </body> </html>

In this tutorial we are going to discuss how to createIf you are user of twitter you may have been observedAll the animation effect is controlled byand it provides very smooth animation effect.We have tried our best to make this tutorial very simple and hope you will like this. Alsoof CSS helps to displaywhen user click on heart button. Without wasting time lets get started.Lets see the complete source code ofIn this example we have used on click event using Jquery to provide blast animation effect. You can checkout our youtube channel for information :This is all aboutIn case of any queries please do comment in comment box below.