Stroke-dasharray和stroke-dashoffset无法处理inkscape创建的路径。我试图使用javascript为路径的这些属性设置动画,但是使用javascript更改stroke-dasharray并且偏移不起作用。
我已经成功地在我自己创建的路径上设置了这些属性的动画,而不使用inkscape。
为什么不能在inkscape创建的路径中使用javascript更改这两个属性?
我正在寻求帮助的inkscape创建路径的代码如下:
<g style="fill:#00804f;fill-opacity:0.94117647" transform="matrix(1.0090909,0,0,1.0092279,-433.08502,-153.85032)">
<path
style="fill-opacity:0.94117647" stroke="#00804f" stroke-width="1" stroke-dasharray="10,10" stroke-dashoffset="10" d="m 590.28572,224.54187 h 23.57142 c -8.68582,0 -15.71428,-6.24644 -15.71428,-13.95074 v -6.97537 c 15.71428,0 15.71428,-13.95074 15.71428,-13.95074 0,0 0,13.95074 15.71429,13.95074 v 6.97537 c 0,7.7043 -7.04393,13.95074 -15.71429,13.95074 h 23.57143 c 4.34304,0 7.85715,-3.12322 7.85715,-6.97537 -4.34304,0 -7.85715,-3.12322 -7.85715,-6.97537 v -13.95074 c 0,-11.55644 -10.55803,-20.9261 -23.57143,-20.9261 -13.02886,0 -23.57142,9.36966 -23.57142,20.9261 v 13.95074 c 0,3.85215 -3.52197,6.97537 -7.85715,6.97537 0,3.85215 3.51436,6.97537 7.85715,6.97537 z" />
</g>