WishList Heart Animation on Click | Sanwebcorner

WishList Heart Animation on Click

Today will see one interesting animation using simple html and css, Heart shape change animation on click event this animation is very useful for anything especially for wishlist. This animation is fully play with background property. In this main thing is heart shape image. Please check the code below and check the live demo how it is working... You can download the file by clicking the download button below. I hope this example is very useful to you.

WishList Heart Animation on Click

<!DOCTYPE html>
<html lang="en" >
  <meta charset="UTF-8">
  <title>onclick wishlist heart animation</title>
.heart {
  width: 100px;
  height: 100px;
  background: url("heart.png") no-repeat;
  background-position: 0 0;
  cursor: pointer;
  transition: background-position 1s steps(28);
  transition-duration: 0s;
.heart.is-active {
  transition-duration: 1s;
  background-position: -2800px 0;

.stage {
  position: fixed;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);

<div class="stage">
  <div class="heart"></div>

  <script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
  $(function() {
  $(".heart").on("click", function() {


Post a comment


360 degree view product image 3d rotate 3d text 3step-form Accordion menu ajax All Browsers Animated Background Gradient animation audio controller auto complete Best accordion menu bootstrap Bootstrap form validation border bounce effect on hover Breadcrumb calculate age by dob calendar Captcha change image on mouse move color chooser countdown Counter on scroll create random number Css css animation css buttons css hover css3 customized upload Button Date picker delete data from table Different scroll speed donation form download zip email otp verification email verifier Embed eventlist Expanding Menu feedbck form flash news section close button full screen menu Google custom search Google Maps Google reCAPTCHA Google site search gradient heart animation hide menu Horizontal News ticker Hover Htm Html html dropdown html form html form validation html5 html5 form validation Iframe image hover increment decrement textbox value based on select box Javascript javascript validation Jquery jquery validation js Layered image effect on mouse hover lock & unlock page scroll marquee marquee with close button mobile number validation mobile otp login Multi-level-drop-down-menu multi-level-form multi-select-checkbox Multi-Step-form Multiple File Upload in PHP mysql News ticker on hover change text to image our team page password generator password strength checker paypal form paypal html form Photoshop PHP php mailer populate html selectbox Popup image on click the link pure css Question type form random number generate Random password Redirect page Based on the select box while submit the form responsive responsive menu responsive popup box Responsive Vertical Time line design rotate image selectbox based on select box simple coming soon page simple countdown based on end date simple typing effect slider sliding tab sms otp login statistic counter on scroll switch tag shape team member Time picker toggle toggle view transparent button underline animation up down slide validation vertical fixed sidebar Webtips whatsapp link website Whislist Youtube