【发布时间】:2016-05-12 17:19:57
【问题描述】:
问题是如何在没有 stroke-dasharray 的情况下垂直扩展行。不知道怎么做才对。这是我的例子:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_3" x="0px" y="0px" width="286px" height="286px" viewBox="0 0 286 286" enable-background="new 0 0 286 286" xml:space="preserve">
<line fill="none" stroke="#3AB0F3" id="stroke-dasharray" stroke-width="244" stroke-miterlimit="10" x1="143" y1="0" x2="143" y2="286"/><animate
attributeName="stroke-dasharray"
from="0, 0" to="143, 143"
dur="3s"
repeatCount="1"/></line>
</svg>
这方面的主要问题是如何在 SVG 上设置属性以在没有 stroke-dasharray 的情况下将其垂直扩展。
还有一些来自 d3 图表的 jQuery 代码。
var mySVG1 = $('#Layer_3').drawsvg({
duration: 3000
});
mySVG1.drawsvg('animate');
【问题讨论】:
标签: javascript jquery css d3.js svg