怎么上下跳动,循环执行。效果就类似于,加载时的动画,自由落体的感觉
网友回复
发飙的蜗牛:
目前小程序支持 lottie ,自己研究下https://developers.weixin.qq.com/miniprogram/dev/extended/functional/lottie.html
宋晓建:
用 CSS animation 就可以了,向上的时候减速,向下的时候加速
.img { background-color: red; width: 40px; height: 40px; animation: jump 1s ease-in infinite alternate forwards; } @keyframes jump { to { transform: translateY(40px); } } |
风舞红枫、づ:
可以用canvas写一个