文章詳情頁
html5 - svg如何做到一組動畫循環
瀏覽:109日期: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. java - 在用戶不登錄的情況下,用戶如何添加保存到購物車?2. java - spring boot 如何打包成asp.net core 那種獨立應用?3. android - SwipeRefreshLayout5.0以下不兼容4. datetime - Python如何獲取當前時間5. 安全性測試 - nodejs中如何防mySQL注入6. html - eclipse 標簽錯誤7. javascript - nginx反向代理靜態資源403錯誤?8. javascript - webpack 分割加載代碼后,react 界面不更新9. javascript - 關于apply()與call()的問題10. python文檔怎么查看?
排行榜
