我正在使用SVG animate元素來使用以下代碼爲矩形設置動畫效果。svg animate - 設置自定義起始位置
更新的代碼
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
\t width="100%" height="100%" viewBox="0 0 1600 700" enable-background="new 0 0 1600 700" xml:space="preserve">
<g>
<rect x="200" y="10" width="100" height="100">
<animate attributeType="XML" attributeName="x" from="-100" to="100%"
dur="10s" repeatCount="indefinite"/>
</rect>
</g>
</svg>
動畫從-100開始,然後移到所有方式svg元素的100%。如何讓矩形從其中定義的x位置(x =「200」)開始動畫,然後轉到屏幕的右端並從連續循環動畫的左側返回?
此外,我如何顯示SVG元素的屏幕的100%寬度(像自舉流體容器)?
在此先感謝。
向我們展示您的其他SVG。特別是根'
更新了代碼 –