title: How to play an animation on hover and pause when hover is not active
body: <p>I have a button that I want to rotate when the mouse hovers over it. However, while the spinning works when the mouse enters, it also spins when the mouse leaves. Here is what I mean:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>button {
    transition: transform 1.2s linear;
  }
  
  button:hover {
    transform: rotate(360deg);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;button&gt;X&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Is there any way to just make the mouse spin when the mouse enters? </p>