Files
worth-calculator/app/globals.css
2025-03-21 15:30:04 +08:00

89 lines
1.4 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
--background: #ffffff;
--foreground: #171717;
}
@media (prefers-color-scheme: dark) {
:root {
--background: #0a0a0a;
--foreground: #ededed;
}
}
body {
color: var(--foreground);
background: var(--background);
font-family: Arial, Helvetica, sans-serif;
}
/* 页面和卡片的过渡动画 */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.animate-fadeIn {
animation: fadeIn 0.5s ease-out forwards;
}
/* 卡片翻页效果 */
@keyframes flipIn {
from {
opacity: 0;
transform: rotateY(-10deg) translateZ(-100px);
}
to {
opacity: 1;
transform: rotateY(0) translateZ(0);
}
}
.animate-flipIn {
animation: flipIn 0.6s ease-out forwards;
}
/* 按钮点击效果 */
.btn-pulse {
position: relative;
overflow: hidden;
}
.btn-pulse::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 5px;
height: 5px;
background: rgba(255, 255, 255, 0.5);
opacity: 0;
border-radius: 100%;
transform: scale(1, 1) translate(-50%, -50%);
transform-origin: 50% 50%;
}
.btn-pulse:focus::after {
animation: ripple 1s ease-out;
}
@keyframes ripple {
0% {
transform: scale(0, 0);
opacity: 0.5;
}
100% {
transform: scale(50, 50);
opacity: 0;
}
}