feat: 添加多种动画效果,包括触摸反馈、涟漪、弹性缩放和滑入动画,优化用户交互体验

This commit is contained in:
2026-01-03 17:27:30 +07:00
parent bea34a3e22
commit 1c931c40b3
2 changed files with 125 additions and 8 deletions

View File

@@ -121,3 +121,117 @@
.animate-rotate-glow {
animation: rotate-glow 10s linear infinite;
}
/* 移动端触摸反馈动画 */
@keyframes tap-feedback {
0% {
transform: scale(1);
}
50% {
transform: scale(0.95);
}
100% {
transform: scale(1);
}
}
.animate-tap {
animation: tap-feedback 0.2s ease-out;
}
/* 涟漪效果 */
@keyframes ripple {
0% {
transform: scale(0);
opacity: 1;
}
100% {
transform: scale(4);
opacity: 0;
}
}
.animate-ripple {
animation: ripple 0.6s ease-out;
}
/* 弹性缩放动画 */
@keyframes bounce-scale {
0% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
100% {
transform: scale(1);
}
}
.animate-bounce-scale {
animation: bounce-scale 0.3s ease-out;
}
/* 滑入动画 - 从左 */
@keyframes slide-in-left {
from {
opacity: 0;
transform: translateX(-30px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.animate-slide-in-left {
animation: slide-in-left 0.4s ease-out forwards;
opacity: 0;
}
/* 滑入动画 - 从右 */
@keyframes slide-in-right {
from {
opacity: 0;
transform: translateX(30px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
.animate-slide-in-right {
animation: slide-in-right 0.4s ease-out forwards;
opacity: 0;
}
/* 脉冲缩放动画 */
@keyframes pulse-scale {
0%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.02);
}
}
.animate-pulse-scale {
animation: pulse-scale 2s ease-in-out infinite;
}
/* 隐藏滚动条 */
.scrollbar-hide {
-ms-overflow-style: none;
scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
display: none;
}
/* 平滑滚动 */
.smooth-scroll {
scroll-behavior: smooth;
-webkit-overflow-scrolling: touch;
}