来源仓库:jxc/ai-fresh-delivery 来源提交:f0b1a180e2deb7e4673b9d1c8542619f7bc0f73d 快照树: 09f679334ff38f0ff25e907961c94a8223bcaedd(与来源 HEAD 工作树逐字节一致,3801 个文件) 按约定本仓库不带任何历史提交:来源仓库的历史中含真实凭据 (生产 SSH 私钥 deploy/id_rsa_tencent、server/.env、.env.tencent/.env.production/.env.gitea、 deploy/小程序AppSecret.txt,其中 MP_APPSECRET / S3 AccessKey 经哈希比对与线上同值), 整包推送会把这些凭据永久带入本仓库,故只取「当前版本」的单提交快照。 供应商系统后续开发自本提交开始。
3.9 KiB
3.9 KiB
name, version, description, keywords, author, style_type
| name | version | description | keywords | author | style_type | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| card-stack | 1.0.0 | Card Stack design style for web interfaces |
|
StyleKit | layout |
Card Stack Style
Overview
卡片前后重叠的立体布局,通过 Z 轴层叠和偏移创造深度感,适合轮播、步骤展示、卡组选择。
Philosophy
Card Stack(卡片堆叠布局)是一种利用 Z 轴创造深度感的布局方式,多张卡片前后重叠,形成视觉层次。
Design Tokens
Border
- Width:
border - Color:
border-zinc-200 - Radius:
rounded-2xl
Shadow
- Small:
shadow-md - Medium:
shadow-xl - Large:
shadow-2xl - Hover:
hover:shadow-2xl
Typography
- Heading:
font-bold tracking-tight - Body:
font-sans - Hero:
text-3xl md:text-4xl lg:text-5xl - H1:
text-2xl md:text-3xl - Body:
text-sm md:text-base
Spacing
- Section:
py-16 md:py-20 lg:py-24 - Container:
px-4 md:px-8 - Card:
p-6 md:p-8
Colors
- Primary BG:
bg-gradient-to-br from-slate-900 to-slate-800 - Secondary BG:
bg-white - Primary Text:
text-zinc-900 - Primary Button:
bg-zinc-900 text-white
Component Recipes
Button
-
Base:
font-medium rounded-full transition-all duration-200 -
Primary:
bg-zinc-900 text-white -
Secondary:
bg-white text-zinc-900 shadow-lg -
Outline:
bg-white/10 text-white border border-white/20 -
Hover:
hover:bg-zinc-800 hover:shadow-xl
Card
-
Base:
bg-white rounded-2xl transition-all duration-300 -
Default:
shadow-xl -
Stacked:
shadow-2xl -
Ghost:
bg-white/80 backdrop-blur-sm shadow-lg -
Hover:
hover:shadow-2xl
Input
- Base:
w-full bg-white/80 backdrop-blur-sm border border-zinc-200 rounded-xl text-zinc-900 placeholder:text-zinc-400 focus:outline-none transition-all duration-200 - Default: ``
- Solid:
bg-white backdrop-blur-none
Forbidden Patterns
These classes must NEVER be used in Card Stack style:
-
rounded-none -
shadow-none -
border-4 -
border-8 -
Pattern:
^rounded-none$ -
Pattern:
^border-[48]
Why:
rounded-none: Card Stack uses generous rounding (rounded-2xl) for soft stacked cardsshadow-none: Card Stack requires shadows to convey depth and layeringborder-4: Card Stack uses subtle or no borders, relying on shadows for definition
Do's
- 使用 transform 和 z-index 创建层叠效果
- 后方卡片缩小和偏移 scale-95 translate-y-4
- 添加渐进的透明度 opacity-80, opacity-60
- 支持拖拽或点击切换卡片
- 添加流畅的过渡动画 transition-all duration-[400ms]
- 限制可见卡片数量(通常 3-5 张)
- 提供视觉提示说明可以交互
- group-hover 时底层卡片向两侧散开(不同 rotate 和 translate-x)
- 顶层卡片 hover 时显著上浮 + shadow-2xl,模拟揭牌感
Don'ts
- 禁止堆叠过多卡片导致混乱
- 禁止卡片完全重叠看不出层次
- 禁止忽略交互反馈
- 禁止动画过于复杂影响性能
- 禁止在移动端使用过于复杂的手势
- 禁止底层卡片在 hover 时静止不动(缺乏景深感)
Layout Archetypes
landing-hero-centered: Centered headline, subtitle, and CTA. Clean and focused.landing-hero-split: Text on left, image/visual on right. Great for product showcases.landing-hero-fullscreen: Full viewport hero with background image or color. High impact.landing-video-hero: Full-screen video background with overlay text. High impact for product demos.landing-saas-pricing: Complete SaaS pricing page with hero, pricing tiers, FAQ, and CTA.landing-waitlist: Minimal pre-launch page with email collection and countdown.
Example Usage
Generate a landing page with:
- Style: card-stack
- Archetype: landing-hero-centered
- Sections: hero, features, cta, footer
- Components: heading (hero variant), button (primary, lg), card (default)
Example Prompts:
- "定价方案选择"
- "产品卡组"
- "步骤引导"
Generated by StyleKit · https://stylekit.dev Style: 卡片堆叠布局 (Card Stack)