带有XML的SVG:如何旋转自定义路径所形成的形状?

时间:2012-09-20 22:51:07

标签: xml path svg rotation

我正在尝试围绕原点(16,16)旋转形状,但以下形状保持静态。

<g>
    <g>
        <path
            style="fill:#666666;fill-opacity:0.5;stroke:none"
            d="M 16 0 L 14.5 6 L 16 12 L 17.5 6 L 16 0 z M 4.6875 4.71875 L 7.875 10.03125 L 13.1875 13.1875 L 10 7.90625 L 4.6875 4.71875 z M 27.28125 4.71875 L 21.96875 7.90625 L 18.8125 13.1875 L 24.09375 10.03125 L 27.28125 4.71875 z M 6 14.5 L 0 16 L 6 17.5 L 12 16 L 6 14.5 z M 26 14.5 L 20 16 L 26 17.5 L 32 16 L 26 14.5 z M 13.1875 18.8125 L 7.875 22 L 4.6875 27.3125 L 10 24.125 L 13.1875 18.8125 z M 18.8125 18.8125 L 21.96875 24.125 L 27.28125 27.3125 L 24.09375 22 L 18.8125 18.8125 z M 16 20 L 14.5 26 L 16 32 L 17.5 26 L 16 20 z ">
        </path>
    </g>
    <animateTransform attributeName="transform" attributeType="XML" from="0 16 16" to="360 16 16" dur="2s" repeatCount="indefinite" type="rotate" fill="freeze"/>
</g>

0 个答案:

没有答案