How to animate back after click with CSS?

I have a fixed button to roll the page to the beginning. When you put the mouse hover, it animates (and animate back when mouse is out). But if you hit the icon, the animation doesn’t roll back. The arrow should translate 360º back.

The structure is

   <div id='back-to-top'>
  <a href="#" class="hvr-icon-spin"></a>
</div>

The workin code with css is http://jsfiddle.net/7vrw4abx/


Source: css3

Leave a Reply