国产成人精品亚洲777人妖,欧美日韩精品一区视频,最新亚洲国产,国产乱码精品一区二区亚洲

您的位置:首頁技術文章
文章詳情頁

html5 - svg如何做到一組動畫循環

瀏覽:116日期:2023-01-29 15:27:39

問題描述

問題解答

回答1:

如果只是單純的改變寬度,少年可以這樣實現

<svg> <rect x=’20’ y=’20’ width=’250’ height=’250’ fill=’blue’><animate animateType='css' attributeName='width' values='250;0;250' dur='3s' repeatCount='indefinite'/> </rect></svg>回答2:

給animate添加id后,使用begin來指定動畫開始的時間為另一個的結束。

不清楚有沒有更好的辦法。

<svg> <rect x='20' y='20' fill='blue'><animate attributeType='CSS' attributeName='width' begin='0s; second.end' from='250' to='0' dur='1s'></animate><animate attributeType='CSS' attributeName='width' begin='first.end' from='0' to='250' dur='1s'></animate> </rect></svg>

標簽: Html5
相關文章:
主站蜘蛛池模板: 赣州市| 化隆| 巫山县| 香河县| 措美县| 固镇县| 阳山县| 枣阳市| 敦化市| 平度市| 买车| 德江县| 馆陶县| 西和县| 新竹县| 井陉县| 瑞丽市| 十堰市| 芜湖县| 正安县| 北宁市| 秦安县| 调兵山市| 辽宁省| 庄浪县| 连山| 西城区| 七台河市| 治多县| 彩票| 治多县| 龙里县| 新沂市| 珲春市| 大同市| 苍溪县| 永顺县| 扶余县| 阿拉善右旗| 泰顺县| 临湘市|