扫码关注官方订阅号
如何让圆环1s跳一下!
人生最曼妙的风景,竟是内心的淡定与从容!
你把 style 中
style
.rightcy{ width:180px; height:180px; border-radius: 50%; border:10px solid transparent; position: absolute; top:0; right:0; border-top:10px solid green; border-right:10px solid green; transform:rotate(-135deg); animation: leftroute 5s linear infinite; <-- 刪除這行 } .leftcy{ width:180px; height:180px; border-radius: 50%; border:10px solid transparent; position: absolute; top:0; left:0; border-bottom:10px solid red; border-left:10px solid red; transform:rotate(-135deg); animation: rightroute 5s linear infinite; <-- 刪除這行 }
就可以了,添加這行會變成直接跑動畫
将rightcy的animation去掉 你已经在样式里面设置动画了setInterval 肯定没有作用了
.rightcy{ width:180px; height:180px; border-radius: 50%; border:10px solid transparent; position: absolute; top:0; right:0; border-top:10px solid green; border-right:10px solid green; transform:rotate(-135deg); /*animation: leftroute 5s linear infinite;*/ }
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
你把
style中就可以了,添加這行會變成直接跑動畫
将rightcy的animation去掉 你已经在样式里面设置动画了setInterval 肯定没有作用了