SVG-动画延迟,元素在宽度开始增长之前可见

SVG-动画延迟,元素在宽度开始增长之前可见,svg,Svg,我想设置宽度的动画,延迟1s。动画在1s后正确启动,但直到完全可见为止-这不是我的想法!它必须是不可见的,直到矩形开始增长 守则: <rect x="25.847" y="161.813" fill="#007188" stroke="#FFFFFF" width="211.671" height="14.014"> <animate attributeName="width" attributeType="XML" begin="1s" dur="2s"

我想设置
宽度的动画,延迟
1s
。动画在1s后正确启动,但直到
完全可见为止-这不是我的想法!它必须是不可见的,直到矩形开始增长

守则:

<rect x="25.847" y="161.813" fill="#007188" stroke="#FFFFFF" width="211.671" height="14.014">
        <animate attributeName="width" attributeType="XML" begin="1s" dur="2s"  
            fill="freeze" from="0" to="211.671"/>
    </rect>


为什么呢?

你可以让一个动画开始,而另一个动画开始。像这样

<rect x="25.847" y="161.813" fill="#007188" stroke="#FFFFFF" width="211.671" height="14.014" visibility="hidden">
    <animate id="a1" attributeName="width" attributeType="XML" begin="1s" dur="2s"  
        fill="freeze" from="0" to="211.671"/>
    <set attributeName="visibility" from="hidden" to="visible" begin="a1.begin"/>
</rect>


或者你可以让第二个动画在1s开始

谢谢,这帮了大忙!