Loading...
Loading...
Compare original and translation side by side
button:active { transform: scale(0.96); }
button { transition: transform 80ms ease-out; }button:active { transform: scale(0.96); }
button { transition: transform 80ms ease-out; }transitiontransition.item:nth-child(1) { animation-delay: 0ms; }
.item:nth-child(2) { animation-delay: 50ms; }
.item:nth-child(3) { animation-delay: 100ms; }.item:nth-child(1) { animation-delay: 0ms; }
.item:nth-child(2) { animation-delay: 50ms; }
.item:nth-child(3) { animation-delay: 100ms; }| Easing | Use for |
|---|---|
| Elements entering the screen — feels natural arrival |
| Elements leaving the screen — feels intentional exit |
| Elements moving between positions on screen |
| Spring physics | Interactive elements that respond to touch/drag |
linear| 缓动类型 | 使用场景 |
|---|---|
| 元素进入屏幕——呈现自然的抵达感 |
| 元素离开屏幕——呈现明确的退出感 |
| 元素在屏幕内移动位置 |
| 弹簧物理曲线 | 响应触摸/拖拽的交互元素 |
lineartransform-origintransform-origin| Duration | Use for |
|---|---|
| 80–120ms | Micro-interactions (button press, hover) |
| 150–250ms | Component transitions (dropdown open, tooltip) |
| 250–400ms | Page-level transitions, modal entrance |
| 400–600ms | Hero animations, onboarding sequences |
| > 600ms | Almost always too long — the user is waiting |
| 时长范围 | 使用场景 |
|---|---|
| 80–120ms | 微交互(按钮按压、悬停) |
| 150–250ms | 组件过渡(下拉菜单展开、工具提示) |
| 250–400ms | 页面级过渡、模态框入场 |
| 400–600ms | 核心区域动画、引导流程 |
| > 600ms | 几乎总是过长——用户会产生等待焦虑 |
@keyframes fade-up {
from { opacity: 0; transform: translateY(24px); }
to { opacity: 1; transform: translateY(0); }
}@keyframes fade-up {
from { opacity: 0; transform: translateY(24px); }
to { opacity: 1; transform: translateY(0); }
}prefers-reduced-motion@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}widthheightpaddingtoplefttransformopacityprefers-reduced-motion@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}widthheightpaddingtoplefttransformopacityprefers-reduced-motionease-outease-inease-in-outtransformopacityprefers-reduced-motionease-outease-inease-in-outtransformopacity