html5 - svg如何做到一組動(dòng)畫(huà)循環(huán)
問(wèn)題描述
問(wèn)題解答
回答1:如果只是單純的改變寬度,少年可以這樣實(shí)現(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來(lái)指定動(dòng)畫(huà)開(kāi)始的時(shí)間為另一個(gè)的結(jié)束。
不清楚有沒(méi)有更好的辦法。
<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>
相關(guān)文章:
1. 在應(yīng)用配置文件 app.php 中找不到’route_check_cache’配置項(xiàng)2. html按鍵開(kāi)關(guān)如何提交我想需要的值到數(shù)據(jù)庫(kù)3. HTML 5輸入框只能輸入漢字、字母、數(shù)字、標(biāo)點(diǎn)符號(hào)?正則如何寫?4. gvim - 誰(shuí)有vim里CSS的Indent文件, 能縮進(jìn)@media里面的5. 跟著課件一模一樣的操作使用tp6,出現(xiàn)了錯(cuò)誤6. PHP類屬性聲明?7. objective-c - ios 怎么實(shí)現(xiàn)微信聯(lián)系列表 最好是swift8. javascript - 請(qǐng)教如何獲取百度貼吧新增的兩個(gè)加密參數(shù)9. html - 微信瀏覽器h5<video>標(biāo)簽問(wèn)題10. java - 安卓接入微信登錄,onCreate不會(huì)執(zhí)行
