css-native by dylantarre/animation-principles
npx skills add https://github.com/dylantarre/animation-principles --skill css-native使用 CSS 动画、过渡和变换实现所有 12 条迪士尼动画原则。
@keyframes squash-stretch {
0%, 100% { transform: scaleX(1) scaleY(1); }
50% { transform: scaleX(1.2) scaleY(0.8); }
}
.ball { animation: squash-stretch 0.3s ease-in-out; }
@keyframes anticipate-jump {
0% { transform: translateY(0); }
20% { transform: translateY(10px) scaleY(0.9); } /* 蓄力 */
100% { transform: translateY(-100px); }
}
.hero { z-index: 10; filter: none; }
.background { z-index: 1; filter: blur(2px); opacity: 0.7; }
/* 关键帧动画 - 明确定义关键帧 */
@keyframes walk-cycle {
0% { background-position: 0 0; }
25% { background-position: -100px 0; }
50% { background-position: -200px 0; }
75% { background-position: -300px 0; }
100% { background-position: -400px 0; }
}
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
.character { animation: move 0.5s ease-out; }
.hair { animation: move 0.5s ease-out 0.05s; } /* 轻微延迟 */
.cape { animation: move 0.5s ease-out 0.1s; }
.element {
transition: transform 0.4s cubic-bezier(0.42, 0, 0.58, 1);
}
/* 或使用:ease-in-out, ease-in, ease-out */
@keyframes arc-motion {
0% { transform: translate(0, 0); }
50% { transform: translate(100px, -80px); }
100% { transform: translate(200px, 0); }
}
/* 使用 offset-path 实现真正的弧线 */
.element { offset-path: path('M0,100 Q100,0 200,100'); }
.button:hover {
transform: scale(1.05);
}
.button:hover .icon {
animation: wiggle 0.3s ease-in-out;
}
.fast { animation-duration: 0.15s; }
.normal { animation-duration: 0.3s; }
.slow { animation-duration: 0.6s; }
.dramatic { animation-duration: 1.2s; }
@keyframes exaggerated-bounce {
0%, 100% { transform: translateY(0) scale(1); }
50% { transform: translateY(-150px) scale(0.8, 1.3); }
}
.element {
transform-style: preserve-3d;
perspective: 1000px;
}
.face { transform: rotateY(20deg); }
.appealing {
border-radius: 50%;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
transition: all 0.3s ease;
}
.appealing:hover {
transform: scale(1.02);
box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
| 动作 | 持续时间 |
|---|---|
| 微交互 | 100-200ms |
| 按钮反馈 | 150-300ms |
| 页面过渡 | 300-500ms |
| 复杂动画 | 500-1000ms |
animation / @keyframestransitiontransformoffset-path (运动路径)animation-timing-functionanimation-delay每周安装量
87
代码仓库
GitHub 星标数
20
首次出现
2026年1月24日
安全审计
安装于
codex76
gemini-cli74
opencode74
cursor69
github-copilot68
claude-code63
Implement all 12 Disney animation principles using CSS animations, transitions, and transforms.
@keyframes squash-stretch {
0%, 100% { transform: scaleX(1) scaleY(1); }
50% { transform: scaleX(1.2) scaleY(0.8); }
}
.ball { animation: squash-stretch 0.3s ease-in-out; }
@keyframes anticipate-jump {
0% { transform: translateY(0); }
20% { transform: translateY(10px) scaleY(0.9); } /* wind up */
100% { transform: translateY(-100px); }
}
.hero { z-index: 10; filter: none; }
.background { z-index: 1; filter: blur(2px); opacity: 0.7; }
/* Pose to pose - define keyframes explicitly */
@keyframes walk-cycle {
0% { background-position: 0 0; }
25% { background-position: -100px 0; }
50% { background-position: -200px 0; }
75% { background-position: -300px 0; }
100% { background-position: -400px 0; }
}
.character { animation: move 0.5s ease-out; }
.hair { animation: move 0.5s ease-out 0.05s; } /* slight delay */
.cape { animation: move 0.5s ease-out 0.1s; }
.element {
transition: transform 0.4s cubic-bezier(0.42, 0, 0.58, 1);
}
/* Or use: ease-in-out, ease-in, ease-out */
@keyframes arc-motion {
0% { transform: translate(0, 0); }
50% { transform: translate(100px, -80px); }
100% { transform: translate(200px, 0); }
}
/* Use offset-path for true arcs */
.element { offset-path: path('M0,100 Q100,0 200,100'); }
.button:hover {
transform: scale(1.05);
}
.button:hover .icon {
animation: wiggle 0.3s ease-in-out;
}
.fast { animation-duration: 0.15s; }
.normal { animation-duration: 0.3s; }
.slow { animation-duration: 0.6s; }
.dramatic { animation-duration: 1.2s; }
@keyframes exaggerated-bounce {
0%, 100% { transform: translateY(0) scale(1); }
50% { transform: translateY(-150px) scale(0.8, 1.3); }
}
.element {
transform-style: preserve-3d;
perspective: 1000px;
}
.face { transform: rotateY(20deg); }
.appealing {
border-radius: 50%;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
transition: all 0.3s ease;
}
.appealing:hover {
transform: scale(1.02);
box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
| Action | Duration |
|---|---|
| Micro-interaction | 100-200ms |
| Button feedback | 150-300ms |
| Page transitions | 300-500ms |
| Complex animations | 500-1000ms |
animation / @keyframestransitiontransformoffset-path (motion paths)animation-timing-functionanimation-delayWeekly Installs
87
Repository
GitHub Stars
20
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex76
gemini-cli74
opencode74
cursor69
github-copilot68
claude-code63
Tailwind CSS v4 2025 现代模式指南:CSS 原生配置、容器查询与响应式设计
369 周安装