React 知命境第 45 篇,原创第 159 篇
有一种能够快速实现复杂动画交互的动画思维 FLIP,为了介绍这个动画思维,我准备了三个案例,大家可以在上面的视频中观看。...该动画接口使用起来也比较简单,跟 keyframes 类似。...0, 0, 0)`},
{backgroundColor: `rgba(0, 0, 0, ${0.3})`}
], {duration: 600})
const rect = current.getBoundingClientRect...0px, 0px)',
height: `${height}px`,
width: `${width}px`
}
], {duration: 600})
}
最后给每个元素添加点击事件...0, 0, ${0.3})`},
{backgroundColor: `rgba(0, 0, 0, 0)`}
], {duration: 600})
const rect = current.getBoundingClientRect