文章详情页
html5 - svg如何做到一组动画循环
浏览:147日期: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. windows-7 - win7下使用cmder,如何设置vim的tab为4个空格?2. python 多进程 或者 多线程下如何高效的同步数据?3. python - 怎么进行服务器性能分析4. javascript - 关于js高级程序中的问题5. thinkPHP5中获取数据库数据后默认选中下拉框的值,传递到后台消失不见。有图有代码,希望有人帮忙6. mysql - 要取出数据库中按某字段排序后的前10,20,30条数据要怎么做?7. web - nginx location 搜索算法问题!?8. javascript - nodejs使用mongoose连接数据库,使用post提交表单在后台,后台处理后调用res.redirect()跳转界面无效?9. MySQL的SELECT...FOR UPDATE究竟起什么作用10. java - socket类服务端如何防止被ddos攻击?
排行榜

网公网安备