/* 渐入动画 */ @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } } /* 渐入上移动画 */ @keyframes fade-in-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } } /* 渐入下移动画 */ @keyframes fade-in-down { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } } /* 缩放动画 */ @keyframes scale-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } } /* 应用动画类 */ .animate-fade-in { animation: fade-in 0.6s ease-out forwards; } .animate-fade-in-up { animation: fade-in-up 0.6s ease-out forwards; opacity: 0; } .animate-fade-in-down { animation: fade-in-down 0.6s ease-out forwards; } .animate-scale-in { animation: scale-in 0.6s ease-out forwards; } /* 发光脉冲效果 */ @keyframes glow-pulse { 0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.3); } 50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.6); } } .animate-glow-pulse { animation: glow-pulse 2s ease-in-out infinite; } /* 渐变背景动画 */ @keyframes gradient-shift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .animate-gradient { background-size: 200% 200%; animation: gradient-shift 8s ease infinite; } /* 悬浮动画 */ @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } } .animate-float { animation: float 3s ease-in-out infinite; } /* 旋转发光效果 */ @keyframes rotate-glow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } .animate-rotate-glow { animation: rotate-glow 10s linear infinite; }