SVG动画在Web中有独特的优势。
CSS动画
.circle {
animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% { r: 50; }
50% { r: 60; }
}GSAP
gsap.to('.element', {
duration: 1,
x: 100,
rotation: 360,
ease: 'power2.inOut'
});
SVG动画在Web中有独特的优势。
.circle {
animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% { r: 50; }
50% { r: 60; }
}gsap.to('.element', {
duration: 1,
x: 100,
rotation: 360,
ease: 'power2.inOut'
});
评论 (0)
暂无评论,来发表第一条评论吧!
发表评论