文章詳情頁
html5 - svg如何做到一組動畫循環
瀏覽:189日期: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
相關文章:
1. javascript - sublime快鍵鍵問題2. javascript - immutable配合react提升性能?3. Apache 已經把網站根目錄的改為allow from all了,但是服務器還是不能訪問?4. css - 寫頁面遇到個布局問題,求大佬們幫解答,在線等,急!~5. javascript - 移動端上不能實現拖拽布局嗎?6. phpstudy8.1支持win11系統嗎?7. 實現bing搜索工具urlAPI提交8. 配置Apache時,添加對PHP的支持時語法錯誤9. javascript - nodejs關于進程間發送句柄的一點疑問10. vue.js - Vue 如何像Angular.js watch 一樣監聽數據變化
排行榜

網公網安備