自己的心我有以下一段代碼:旋轉矩形圍繞SVG
<svg>
<defs>
<rect id = "myRect"
x = "10"
y = "10"
height = "120"
width = "120"
stroke-width = "2px"
stroke = "red"
fill = "blue" />
</defs>
<g transform = "translate(100,30)">
<use xlink:href = "#myRect" />
</g>
<g transform = "translate(100, 100) rotate(45 ? ?)">
<rect id = "myRect"
x = "10"
y = "10"
height = "120"
width = "120"
stroke-width = "2px"
stroke = "green"
fill = "yellow" />
</g>
</svg>
當我翻譯不旋轉矩形,它工作正常。但是當我旋轉它時,我想旋轉它的中心軸點。我需要通過什麼來旋轉屬性?
具有相同id(myRect)的兩個元素會造成麻煩。 – 2013-02-28 15:12:21