title: How do I animate a polygon to spin in place with SVG?
body: <p>I have an 8 sided polygon that I want to spin clockwise at its center axis with text. Looking at MDN web docs shows a simple triangle spinning in place, but when I apply it to a polygon it doesn't quite work.</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-html lang-html prettyprint-override"><code>&lt;svg width="500" height="300"&gt;
    &lt;polygon 
        points="25,5   75,5  100,30  100,80 75,105
        25,105  0,80  0, 30"
        style="stroke:gray; fill:#cc3333; stroke-width: 3;"&gt;
          &lt;animateTransform attributeName="transform"
                            attributeType="XML"
                            type="rotate"
                            from="0 60 70"
                            to="360 60 70"
                            dur="10s"
                            repeatCount="indefinite"/&gt;
        &lt;/polygon&gt;                    
  &lt;/svg&gt;</code></pre>
  </div>
  </div>
  </p>