<div class="stage">
  <div class="heart"></div>
</div>
// TWITTER HEART
.heart {
  width: 100px;
  height: 100px;
  background: url("https://cssanimation.rocks/images/posts/steps/heart.png") no-repeat;
  background-position: 0 0;
  cursor: pointer;
  transition: background-position 1s steps(28);
  transition-duration: 0s;
  
  &.is-active {
    transition-duration: 1s;
    background-position: -2800px 0;
  }
}

// BASIC
body {
  background: linear-gradient(135deg, #121721 0%, #000000 100%) fixed;
  color: #FFF;
  font: 300 16px/1.5 "Open Sans", sans-serif;
}

.stage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
View Compiled
$(function() {
  $(".heart").on("click", function() {
    $(this).toggleClass("is-active");
  });
});

External CSS

  1. https://fonts.googleapis.com/css?family=Open+Sans

External JavaScript

  1. https://code.jquery.com/jquery-2.2.4.min.js