相关疑难解决方法(0)

SVG缩放动画从中心点而不是左上角

如何animateTransform在SVG中使用从中心点而不是左上角缩放对象?

例:

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100px" height="100px">
    <circle style="fill:blue;" cx="50" cy="50" r="45">
        <animateTransform attributeName="transform"
             type="scale"
             from="0 0"
             to="1 1"
             begin="0s"
             dur="1s"
             repeatCount="indefinite"
        />
    </circle>
</svg>
Run Code Online (Sandbox Code Playgroud)

(Codepen:http://codepen.io/anon/pen/wKwrPg?editors = 100 )

在此输入图像描述

animation svg svg-animate

10
推荐指数
2
解决办法
1万
查看次数

标签 统计

animation ×1

svg ×1

svg-animate ×1