您的位置:首页技术文章
文章详情页

css3怎么能做到弧形的运动轨迹

浏览:71日期:2023-06-15 11:36:07

问题描述

因为想做花瓣掉落的逼真样子 现在只是在中间点加上了一个断点 但是运动的非常生硬怎么能用css3 keyfames 做出那种弧形的运动轨迹 得到帮助非常感谢

问题解答

回答1:

应该能,不过需要计算下,变化的参数

回答2:

我做过一个金币掉落的效果我的动画这么写的

@keyframes drop 0% transform: translate(0,0) rotate3d(0,1,0,0deg) 33% transform: translate(-20px,245px) rotate3d(0,1,0,-60deg) 66% transform: translate(20px,490px) rotate3d(0,1,0,60deg) 100% transform: translate(0,736px) rotate3d(0,1,0,0deg) @keyframes drop2 0% transform: translate(0,0) rotate3d(1,0,0,0deg) 33% transform: translate(20px,245px) rotate3d(1,0,0,60deg) 66% transform: translate(-20px,490px) rotate3d(1,0,0,-60deg) 100% transform: translate(0,736px) rotate3d(1,0,0,0deg)回答3:

曲线的时间参数,横着匀速,竖着变速。或者反过来,能模拟出曲线时间参数

标签: CSS
相关文章: