文章详情页
html5 - svg如何做到一组动画循环
浏览:123日期: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 - 如图,百度首页,查看源代码为什么什么都没有?2. vue.js - linux下怎么使用vue-cli的vue命令3. 怎样在java中查询mysql得到如下的json格式的结果?4. javascript - js的string数据类型,这段表述是什么意思?5. 微信内网页上传图片问题6. webpack - vue-cli写的项目(本地跑没有问题),准备放到Nginx服务器上,有什么配置需要改的?还有怎么部署?7. 极光推送 - Android app消息推送 百度 极光 个推 信鸽哪个好一些?8. 什么是前后端分离?用vue angular等js框架就能实现前后分离了吗?9. ddos - apache日志很多其它网址,什么情况?10. android - 百度地图加载完成监听
排行榜
