【发布时间】:2012-03-15 22:13:36
【问题描述】:
我尝试围绕他的中心点旋转矩形,但我不明白它是如何工作的。 svg 中是否有简单的代码可以在没有 Cos Sin 函数或复杂代码的情况下解决问题。 经过大量测试后,我尝试并最终成功,但是如果我想调整重新调整的大小或将其移动到中心页面,一切都会变得一团糟,你能告诉我该怎么做吗? 谢谢。 jsfiddle.net
我的代码:
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<rect x="10" y="10" height="100" width="100"
style="stroke:#FF0000; fill: #9C4100">
<animateTransform
attributeName="transform"
begin="0s"
dur="40s"
type="rotate"
from="0 60 60"
to="360 60 60"
repeatCount="1"
/>
</rect>
<circle id="pointA" cx="60" cy="60" r="48" />
</svg>
【问题讨论】:
-
谢谢我正在寻找的东西