扫码关注官方订阅号
问题代码:https://jsfiddle.net/zhoou/qd...
@keyframes tiao{ 0%{ transform: translate(0,0);} 50%{ transform: translate(0,-20px);} 75%{ transform: translate(0,0);} 100%{ transform: translate(0,20px);} }
这么写,不能在0%的时候就定义-20px,这样会导致瞬间位移,所以看起来成了你说的卡
.cir li{ float: left; width: 20px; height: 20px; border-radius: 50%; margin:10px; background: #ccc; line-height: 20px; text-align: center;transform: translate(0,-20px);}
初始的时候加上-20px可以咯!
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
这么写,不能在0%的时候就定义-20px,这样会导致瞬间位移,所以看起来成了你说的卡
初始的时候加上-20px可以咯!