【发布时间】:2017-09-21 05:24:04
【问题描述】:
我尝试在不使用 css 的情况下旋转 svg 圆,我的代码是:
<g id="center_circle" transform="translate(-58.909212,391.47247)">
<path style="opacity:1;fill:transparent;fill-opacity:1;fill-rule:nonzero;stroke:#295495;stroke-width:12;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:1500;stroke-dashoffset:1500;stroke-opacity:1" d="m 466.0714,332.36218 a 91.428581,91.428581 0 0 1 -91.16568,91.42821 91.428581,91.428581 0 0 1 -91.68997,-90.90242 91.428581,91.428581 0 0 1 90.63839,-91.95097 91.428581,91.428581 0 0 1 92.21122,90.37362" id="path5403">
<animate id="center_circle_border_anim" attributeName="stroke-dashoffset" from="1500" to="0" begin="0.5s" dur="2s" fill="freeze" repeatCount="1"></animate>
<animate id="center_circle_anim" attributeName="fill" from="transparent" to="#fff" begin="center_circle_border_anim.end" dur="0.5s" fill="freeze" repeatCount="1"></animate>
</path>
</g>
我的问题是让圆 dashoffset 从顶部开始,并且圆应该在 dashoffset 完成后旋转。
【问题讨论】:
标签: html css svg svg-animate