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>

The workin code with css is

Source: css3

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.