Http://www.cnblogs.com/pingfan1990/p/4757934.html
Http://www.cnblogs.com/duanhuajian/archive/2013/07/31/3227410.html
http://www.zhangxinxu.com/wordpress/2014/08/so-powerful-svg-smil-animation/
Animatetransform the point in the upper-left corner of the SVG rotate to the element center point
Instance code:
<svg width=
"400"
height=
"400"
>
<rect x=
"0"
y=
"0"
fill=
"green"
rx=
"4"
width=
"200"
height=
"200"
>
<animateTransform attributeName=
"transform"
type=
"rotate"
form=
"0"
to=
"360"
begin=
"0"
dur=
"5s"
repeatCount=
"indefinite"
/></rect>
</svg>
Example of the above code we let the 200x200 square element, do the rotation movement, but in SVG inside the rotate rotation for the point is the upper left corner of SVG. We want to do something about the center point of the element.
The usual solution:
<svg width=
"400"
height=
"400"
>
<g transform=
"translate(200,200)"
>
<rect x=
"-100"
y=
"-100"
fill=
"green"
rx=
"4"
width=
"200"
height=
"200"
>
<animateTransform attributeName=
"transform"
type=
"rotate"
form=
"0"
to=
"360"
begin=
"0"
dur=
"5s"
repeatCount=
"indefinite"
/>
</rect>
<g>
</svg>
We added a combo label <g transform= "Translate (200,200)" ></g> to move the coordinates starting point of the SVG to the center point of the container (the SVG placeholder position remains unchanged). Then the element is drawn from the new starting point, and the rotation is possible.
SVG Some learning references