文章詳情頁
html5 - svg如何做到一組動畫循環(huán)
瀏覽:103日期:2023-01-29 15:27:39
問題描述
問題解答
回答1:如果只是單純的改變寬度,少年可以這樣實現(xiàn)
<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來指定動畫開始的時間為另一個的結(jié)束。
不清楚有沒有更好的辦法。
<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>
標(biāo)簽:
Html5
相關(guān)文章:
1. docker images顯示的鏡像過多,狗眼被亮瞎了,怎么辦?2. javascript - Web微信聊天輸入框解決方案3. 請教各位大佬,瀏覽器點 提交實例為什么沒有反應(yīng)4. javascript - log4js的使用問題5. docker - 如何修改運(yùn)行中容器的配置6. javascript - 移動端textarea不能上下滑動,該怎么解決?7. javascript - history.replaceState()無法改變query參數(shù)8. javascript - 為什么form表單提交沒有跨域問題,但ajax提交有跨域問題?9. javascript - Ajax加載Json時,移動端頁面向左上角縮小一截兒,加載完成后才正常顯示,這該如何解決?10. javascript - 為什么這個點擊事件需要點擊兩次才有效果
排行榜

熱門標(biāo)簽