文章详情页
html5 - svg如何做到一组动画循环
浏览:223日期: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. html5 - 请问一下写H5的时候 你们都是兼容那些手机2. python3.x - python多线程如何修改数据?3. linux - python 安装 Anaconda 环境变量问题请教4. javascript - 请教,用原生js插入html的问题5. mysql - SQL添加记录的数据来源于同一个表6. mysql sql where id in(25,12,87) 结果集如何用按照 25 12 87排序?7. python中merge后文件莫名变得非常大8. mysql连表排序9. mysql插入文本如果是个sql语句就报错了10. javascript - 使用vue-cli有个报错ERR_INCOMPLETE_CHUNKED_ENCODING
排行榜

网公网安备