Rotate rectangle around its own center in SVG

前端 未结 5 1555
孤独总比滥情好
孤独总比滥情好 2020-12-05 08:59

I have following piece of code :






        
5条回答
  •  醉酒成梦
    2020-12-05 09:42

    You just need to add half the width/height of the rectangle to get its centre.

    
    

    See transform documentation of the rotate function for more information.

提交回复
热议问题