StyleKit
风格库模板社区生成器素材库GitHub
风格目录/Apple 流动玻璃

Apple 流动玻璃

Apple Liquid Glass

C
60/100一般

Apple WWDC 2025 发布的全新设计语言,通过 SVG 折射滤镜、彩虹边缘光晕、流体形变动画和多层玻璃堆叠,创造出超越传统毛玻璃的有机流动视觉体验。

AppleLiquid Glass流动玻璃彩虹边缘折射多层堆叠WWDC 2025
查看完整 Showcase →对比

配色方案

Primary

rgba(255, 255, 255, 0.1)

Secondary

rgba(255, 255, 255, 0.15)

Accent 1

#ff6b6b

Accent 2

#4ecdc4

Accent 3

#a855f7

Accent 4

#007AFF

Accent 5

#FF2D55

提示词

硬性 + 软性提示词

一键复制并生成 Apple 流动玻璃 风格界面。硬性提示词用于强约束一致性,软性提示词用于保留风格方向下的灵活实现。

硬性提示词

高一致性,严格执行风格规则

STYLEKIT_STYLE_REFERENCE
style_name: Apple 流动玻璃
style_slug: liquid-glass
style_source: /styles/liquid-glass

# Hard Prompt

请严格遵守以下风格规则并保持一致性,禁止风格漂移。

## 执行要求
- 优先保证风格一致性,其次再做创意延展。
- 遇到冲突时以禁止项为最高优先级。
- 输出前自检:颜色、排版、间距、交互是否仍属于该风格。

## Style Rules
# Apple Liquid Glass (Apple 流动玻璃) Design System

> Apple WWDC 2025 发布的全新设计语言,通过 SVG 折射滤镜、彩虹边缘光晕、流体形变动画和多层玻璃堆叠,创造出超越传统毛玻璃的有机流动视觉体验。

## 核心理念

Liquid Glass(流动玻璃)是 Apple WWDC 2025 发布的革命性设计语言,超越传统毛玻璃效果,通过光线折射、彩虹边缘和流体动画创造出真正有机、流动的视觉体验。

核心理念:
- 霓虹描边文字:标题使用 text-stroke 配合青色发光描边,产生霓虹效果
- 渐变填充文字:紫色到品红的渐变填充,配合 3D 阴影产生立体感
- 彩虹折射边缘:边缘呈现棱镜效果,红橙黄绿青蓝紫的光谱渐变
- 流体形变:圆角随交互产生液态变形动画
- 多层深度:3+ 层玻璃堆叠产生丰富的空间层次
- 高饱和度:backdrop-saturate-180 让背景色彩更加鲜艳

## 字体设计核心(最重要的视觉元素)

### Hero 标题(主标题)
紫色渐变填充 + 粗青色描边(3px) + 3D偏移阴影:
- background: linear-gradient(to right, #a855f7, #ff2d92, #a855f7)
- -webkit-text-stroke: 3px #4ecdc4
- text-shadow: 4px 4px 0 rgba(0,0,0,0.5), 0 0 20px rgba(78,205,196,0.5), 0 0 40px rgba(168,85,247,0.3)
- filter: drop-shadow(0 0 15px rgba(78,205,196,0.4))

### 副标题(青色发光)
白色/青色文字 + 发光效果(无描边):
- color: white 或 gradient cyan
- text-shadow: 0 0 20px rgba(78,205,196,0.8), 0 0 40px rgba(78,205,196,0.4), 2px 2px 0 rgba(0,0,0,0.3)

### h1/h2 标题
较细描边(2px) + 发光 + 轻微3D:
- -webkit-text-stroke: 2px #4ecdc4
- text-shadow: 3px 3px 0 rgba(0,0,0,0.4), 0 0 15px rgba(78,205,196,0.4)

### 正文
高对比度白色,保证可读性:
- color: text-white/80 到 text-white/90

与 Glassmorphism 的区别:
| 特性 | Glassmorphism | Liquid Glass |
|------|---------------|--------------|
| 边框 | border-white/20 | 彩虹渐变边框 |
| 模糊 | blur-2xl | blur-3xl + saturate-180 |
| 动画 | 简单过渡 | 液态形变 morph |
| 深度 | 单层 | 多层堆叠 |
| 文字 | 普通白色 | 渐变+粗描边+3D阴影 |
| 描边 | 无 | 3px青色霓虹描边 |
| 阴影 | 普通投影 | 3D偏移+发光组合 |

---

## Token 字典(精确 Class 映射)

### 边框
```
宽度: border
颜色: border-white/20
圆角: rounded-[24px]
```

### 阴影
```
小:   shadow-lg shadow-black/5
中:   shadow-xl shadow-black/10
大:   shadow-2xl shadow-black/15
悬停: hover:shadow-xl hover:shadow-black/15
聚焦: focus:shadow-[0_0_0_2px_rgba(168,85,247,0.5),0_0_20px_rgba(168,85,247,0.2)]
```

### 交互效果
```
悬停位移: undefined
过渡动画: transition-all duration-500 ease-out
按下状态: active:scale-[0.98]
```

### 字体
```
标题: font-black bg-gradient-to-r from-[#a855f7] via-[#ff2d92] to-[#a855f7] bg-clip-text text-transparent
正文: text-white/80
```

### 字号
```
Hero:  text-5xl md:text-7xl lg:text-8xl
H1:    text-4xl md:text-5xl
H2:    text-3xl md:text-4xl
H3:    text-xl md:text-2xl
正文:  text-sm md:text-base
小字:  text-xs
```

### 间距
```
Section: py-16 md:py-24
容器:    px-6 md:px-8
卡片:    p-6 md:p-8
```

---

## [FORBIDDEN] 绝对禁止

以下 class 在本风格中**绝对禁止使用**,生成时必须检查并避免:

### 禁止的 Class
- `rounded-none`
- `rounded-sm`
- `rounded`
- `bg-white`
- `bg-black`
- `bg-gray-100`
- `bg-gray-900`
- `shadow-[0px_0px_0px`
- `backdrop-blur-sm`
- `backdrop-blur`
- `duration-100`
- `duration-150`
- `duration-200`
- `border-black`
- `border-gray-500`
- `border-white`
- `bg-gray-50`
- `bg-slate-100`

### 禁止的模式
- 匹配 `^rounded-none`
- 匹配 `^rounded-sm$`
- 匹配 `^rounded$`
- 匹配 `^bg-(?!white\/|gradient|transparent)`
- 匹配 `^border-(?!white\/|transparent)`
- 匹配 `^backdrop-blur$`
- 匹配 `^backdrop-blur-sm$`
- 匹配 `^duration-(100|150|200)$`

### 禁止原因
- `rounded-none`: Liquid Glass requires large rounded corners (rounded-[24px] or rounded-3xl)
- `rounded-sm`: Liquid Glass requires large rounded corners (rounded-[24px] or rounded-3xl)
- `bg-white`: Liquid Glass uses semi-transparent backgrounds (bg-white/10 to bg-white/15)
- `bg-black`: Liquid Glass requires semi-transparent backgrounds, not opaque colors
- `backdrop-blur-sm`: Liquid Glass requires high blur (backdrop-blur-[40px] or backdrop-blur-3xl)
- `backdrop-blur`: Liquid Glass requires high blur (backdrop-blur-[40px] or backdrop-blur-3xl)
- `duration-100`: Liquid Glass uses fluid animations (duration-500 or higher)
- `duration-150`: Liquid Glass uses fluid animations (duration-500 or higher)
- `duration-200`: Liquid Glass uses fluid animations (duration-500 or higher)
- `border-white`: Liquid Glass uses gradient borders for rainbow refraction effect

> WARNING: 如果你的代码中包含以上任何 class,必须立即替换。

---

## [REQUIRED] 必须包含

### 按钮必须包含
```
bg-white/10 backdrop-blur-[40px] backdrop-saturate-[1.8]
rounded-[20px]
text-white
before:absolute before:inset-0 before:rounded-[20px] before:p-[1px] before:-z-10
before:bg-gradient-to-r before:from-[#ff6b6b] before:via-[#4ecdc4] before:to-[#a855f7]
after:absolute after:inset-[1px] after:rounded-[19px] after:-z-10
after:bg-gradient-to-b after:from-white/20 after:to-transparent
hover:bg-white/15 hover:shadow-[0_0_20px_rgba(168,85,247,0.3)]
transition-all duration-500 ease-out
```

### 卡片必须包含
```
bg-white/10 backdrop-blur-[40px] backdrop-saturate-[1.8]
rounded-[24px]
shadow-xl shadow-black/10
before:absolute before:inset-0 before:rounded-[24px] before:p-[1px] before:-z-10
before:bg-gradient-to-br before:from-[#ff6b6b] before:via-[#4ecdc4] before:to-[#a855f7]
after:absolute after:inset-[1px] after:rounded-[23px] after:-z-10
after:bg-gradient-to-b after:from-white/15 after:to-transparent
[box-shadow:inset_0_1px_0_rgba(255,255,255,0.4)]
```

### 输入框必须包含
```
bg-white/10 backdrop-blur-[40px] backdrop-saturate-[1.8]
border border-white/20
rounded-[16px]
text-white placeholder-white/50
focus:outline-none focus:bg-white/15
focus:border-transparent
focus:shadow-[0_0_0_2px_rgba(168,85,247,0.5),0_0_20px_rgba(168,85,247,0.2)]
transition-all duration-500 ease-out
```

---

## [COMPARE] 错误 vs 正确对比

### 按钮

[WRONG] **错误示例**(使用了圆角和模糊阴影):
```html
<button class="rounded-lg shadow-lg bg-blue-500 text-white px-4 py-2 hover:bg-blue-600">
  点击我
</button>
```

[CORRECT] **正确示例**(使用硬边缘、无圆角、位移效果):
```html
<button class="bg-white/10 backdrop-blur-[40px] backdrop-saturate-[1.8] rounded-[20px] text-white before:absolute before:inset-0 before:rounded-[20px] before:p-[1px] before:-z-10 before:bg-gradient-to-r before:from-[#ff6b6b] before:via-[#4ecdc4] before:to-[#a855f7] after:absolute after:inset-[1px] after:rounded-[19px] after:-z-10 after:bg-gradient-to-b after:from-white/20 after:to-transparent hover:bg-white/15 hover:shadow-[0_0_20px_rgba(168,85,247,0.3)] transition-all duration-500 ease-out bg-[#ff006e] text-white px-4 py-2 md:px-6 md:py-3">
  点击我
</button>
```

### 卡片

[WRONG] **错误示例**(使用了渐变和圆角):
```html
<div class="rounded-xl shadow-2xl bg-gradient-to-r from-purple-500 to-pink-500 p-6">
  <h3 class="text-xl font-semibold">标题</h3>
</div>
```

[CORRECT] **正确示例**(纯色背景、硬边缘阴影):
```html
<div class="bg-white/10 backdrop-blur-[40px] backdrop-saturate-[1.8] rounded-[24px] shadow-xl shadow-black/10 before:absolute before:inset-0 before:rounded-[24px] before:p-[1px] before:-z-10 before:bg-gradient-to-br before:from-[#ff6b6b] before:via-[#4ecdc4] before:to-[#a855f7] after:absolute after:inset-[1px] after:rounded-[23px] after:-z-10 after:bg-gradient-to-b after:from-white/15 after:to-transparent [box-shadow:inset_0_1px_0_rgba(255,255,255,0.4)] p-6 md:p-8">
  <h3 class="font-black bg-gradient-to-r from-[#a855f7] via-[#ff2d92] to-[#a855f7] bg-clip-text text-transparent text-xl md:text-2xl">标题</h3>
</div>
```

### 输入框

[WRONG] **错误示例**(灰色边框、圆角):
```html
<input class="rounded-md border border-gray-300 px-3 py-2 focus:ring-2 focus:ring-blue-500" />
```

[CORRECT] **正确示例**(黑色粗边框、聚焦阴影):
```html
<input class="bg-white/10 backdrop-blur-[40px] backdrop-saturate-[1.8] border border-white/20 rounded-[16px] text-white placeholder-white/50 focus:outline-none focus:bg-white/15 focus:border-transparent focus:shadow-[0_0_0_2px_rgba(168,85,247,0.5),0_0_20px_rgba(168,85,247,0.2)] transition-all duration-500 ease-out px-3 py-2 md:px-4 md:py-3" placeholder="请输入..." />
```

---

## [TEMPLATES] 页面骨架模板

使用以下模板生成页面,只需替换 `{PLACEHOLDER}` 部分:

### 导航栏骨架
```html
<nav class="bg-white border-b-2 md:border-b-4 border-black px-4 md:px-8 py-3 md:py-4">
  <div class="flex items-center justify-between max-w-6xl mx-auto">
    <a href="/" class="font-black text-xl md:text-2xl tracking-wider">
      {LOGO_TEXT}
    </a>
    <div class="flex gap-4 md:gap-8 font-mono text-sm md:text-base">
      {NAV_LINKS}
    </div>
  </div>
</nav>
```

### Hero 区块骨架
```html
<section class="min-h-[60vh] md:min-h-[80vh] flex items-center px-4 md:px-8 py-12 md:py-0 bg-{ACCENT_COLOR} border-b-2 md:border-b-4 border-black">
  <div class="max-w-4xl mx-auto">
    <h1 class="font-black text-4xl md:text-6xl lg:text-8xl leading-tight tracking-tight mb-4 md:mb-6">
      {HEADLINE}
    </h1>
    <p class="font-mono text-base md:text-xl max-w-xl mb-6 md:mb-8">
      {SUBHEADLINE}
    </p>
    <button class="bg-black text-white font-black px-6 py-3 md:px-8 md:py-4 border-2 md:border-4 border-black shadow-[4px_4px_0px_0px_rgba(255,0,110,1)] md:shadow-[8px_8px_0px_0px_rgba(255,0,110,1)] hover:shadow-none hover:translate-x-[2px] hover:translate-y-[2px] transition-all text-sm md:text-base">
      {CTA_TEXT}
    </button>
  </div>
</section>
```

### 卡片网格骨架
```html
<section class="py-12 md:py-24 px-4 md:px-8">
  <div class="max-w-6xl mx-auto">
    <h2 class="font-black text-2xl md:text-4xl mb-8 md:mb-12">{SECTION_TITLE}</h2>
    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 md:gap-6">
      <!-- Card template - repeat for each card -->
      <div class="bg-white border-2 md:border-4 border-black shadow-[4px_4px_0px_0px_rgba(0,0,0,1)] md:shadow-[8px_8px_0px_0px_rgba(0,0,0,1)] p-4 md:p-6 hover:shadow-[4px_4px_0px_0px_rgba(255,0,110,1)] md:hover:shadow-[8px_8px_0px_0px_rgba(255,0,110,1)] hover:-translate-y-1 transition-all">
        <h3 class="font-black text-lg md:text-xl mb-2">{CARD_TITLE}</h3>
        <p class="font-mono text-sm md:text-base text-gray-700">{CARD_DESCRIPTION}</p>
      </div>
    </div>
  </div>
</section>
```

### 页脚骨架
```html
<footer class="bg-black text-white py-12 md:py-16 px-4 md:px-8 border-t-2 md:border-t-4 border-black">
  <div class="max-w-6xl mx-auto">
    <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
      <div>
        <span class="font-black text-xl md:text-2xl">{LOGO_TEXT}</span>
        <p class="font-mono text-sm mt-4 text-gray-400">{TAGLINE}</p>
      </div>
      <div>
        <h4 class="font-black text-lg mb-4">{COLUMN_TITLE}</h4>
        <ul class="space-y-2 font-mono text-sm text-gray-400">
          {FOOTER_LINKS}
        </ul>
      </div>
    </div>
  </div>
</footer>
```

---

## [CHECKLIST] 生成后自检清单

**在输出代码前,必须逐项验证以下每一条。如有违反,立即修正后再输出:**

### 1. 圆角检查
- [ ] 搜索代码中的 `rounded-`
- [ ] 确认只有 `rounded-none` 或无圆角
- [ ] 如果发现 `rounded-lg`、`rounded-md` 等,替换为 `rounded-none`

### 2. 阴影检查
- [ ] 搜索代码中的 `shadow-`
- [ ] 确认只使用 `shadow-[Xpx_Xpx_0px_0px_rgba(...)]` 格式
- [ ] 如果发现 `shadow-lg`、`shadow-xl` 等,替换为正确格式

### 3. 边框检查
- [ ] 搜索代码中的 `border-`
- [ ] 确认边框颜色是 `border-black`
- [ ] 如果发现 `border-gray-*`、`border-slate-*`,替换为 `border-black`

### 4. 交互检查
- [ ] 所有按钮都有 `hover:shadow-none hover:translate-x-[2px] hover:translate-y-[2px]`
- [ ] 所有卡片都有 hover 效果(阴影变色或位移)
- [ ] 都包含 `transition-all`

### 5. 响应式检查
- [ ] 边框有 `border-2 md:border-4`
- [ ] 阴影有 `shadow-[4px...] md:shadow-[8px...]`
- [ ] 间距有 `p-4 md:p-6` 或类似的响应式值
- [ ] 字号有 `text-sm md:text-base` 或类似的响应式值

### 6. 字体检查
- [ ] 标题使用 `font-black`
- [ ] 正文使用 `font-mono`

> CRITICAL: **如果任何一项检查不通过,必须修正后重新生成代码。**

---

## [EXAMPLES] 示例 Prompt

### 1. Apple 风格控制中心

iOS 风格的流动玻璃控制中心

```
用 Liquid Glass 风格创建一个 iOS 风格控制中心,要求:

## 核心效果
- 背景:深色渐变 bg-gradient-to-br from-[#1a1a2e] via-[#16213e] to-[#0f0f23]
- 主面板:bg-white/10 backdrop-blur-[40px] backdrop-saturate-[1.8] rounded-[24px]
- 彩虹边框:使用 before 伪元素实现渐变边框
- 顶部渐变:使用 after 伪元素实现高光

## 控制模块
- 网格布局:2x4 圆角正方形网格
- 每个磁贴:bg-white/10 rounded-[16px] 带彩虹边框
- 激活状态:bg-[#007AFF]/40 shadow-[0_0_20px_rgba(0,122,255,0.4)]

## 交互
- 开关控件:胶囊形状,开启时带发光
- 滑块控件:流动玻璃轨道,圆形滑块带发光
- 所有过渡:transition-all duration-500 ease-out
```

### 2. 流动玻璃音乐播放器

Apple Music 风格播放界面

```
用 Liquid Glass 风格设计一个音乐播放器界面,要求:

## 背景层
- 当前播放歌曲的模糊封面作为背景
- 叠加深色渐变:bg-gradient-to-b from-black/40 via-transparent to-black/60

## 播放卡片(多层玻璃)
- 外层容器:bg-white/8 backdrop-blur-[40px] backdrop-saturate-[1.8] rounded-[32px]
- 彩虹边框:before 伪元素实现
- 内层面板:bg-white/12 rounded-[28px] p-6

## 控件设计
- 专辑封面:rounded-[20px] shadow-2xl 带发光边框
- 播放按钮:w-16 h-16 bg-white/15 rounded-full 带脉冲发光动画
- 上下曲按钮:w-12 h-12 bg-white/10 rounded-full
- 进度条:h-1 bg-white/20 rounded-full,滑块 w-4 h-4 带发光

## 动画
- 专辑封面:hover 时微微放大和发光
- 播放按钮:按下时液态压缩效果
- 进度条滑块:拖动时发光增强
```

### 3. 流动玻璃登录页面

现代登录表单设计

```
用 Liquid Glass 风格创建一个登录页面,要求:

## 全屏背景
- 深色渐变:bg-gradient-to-br from-[#1a1a2e] via-[#16213e] to-[#0f0f23]
- 添加装饰性彩虹光斑元素

## 登录卡片
- 居中容器:max-w-md mx-auto
- 流动玻璃:bg-white/10 backdrop-blur-[40px] backdrop-saturate-[1.8]
- 圆角:rounded-[32px]
- 彩虹边框:before 伪元素
- 顶部高光:after 伪元素

## 表单元素
- 输入框:bg-white/10 backdrop-blur-xl border border-white/20 rounded-[16px]
- 焦点态:focus:bg-white/15 focus:shadow-[0_0_0_2px_rgba(168,85,247,0.5)]
- 占位符:placeholder:text-white/50

## 按钮
- 主按钮:彩虹渐变边框 + 发光 hover 效果
- 次按钮:bg-transparent border border-white/30 text-white/80
- 社交登录:bg-white/10 hover:bg-white/15 rounded-[12px]

## 额外元素
- Logo:text-white text-2xl font-bold 带发光效果
- 分隔线:border-t border-white/20 my-6
- 链接:text-white/70 hover:text-white
```

软性提示词

保留风格方向,允许实现灵活

STYLEKIT_STYLE_REFERENCE
style_name: Apple 流动玻璃
style_slug: liquid-glass
style_source: /styles/liquid-glass

# Soft Prompt

保持整体风格气质即可,允许实现细节灵活调整,但不要偏离核心视觉语言。

## Style Signals
- Apple
- Liquid Glass
- 流动玻璃
- 彩虹边缘
- 折射
- 多层堆叠

## Prefer
- Hero标题使用粗描边 -webkit-text-stroke: 3px #4ecdc4
- Hero标题使用3D偏移阴影 text-shadow: 4px 4px 0 rgba(0,0,0,0.5)
- Hero标题使用渐变填充 bg-gradient-to-r from-[#a855f7] via-[#ff2d92] to-[#a855f7]
- 副标题使用青色发光 text-shadow: 0 0 20px rgba(78, 205, 196, 0.8)

## Avoid
- 禁止使用普通白色标题(必须使用渐变+粗描边+3D阴影)
- 禁止省略3D偏移阴影(4px 4px是必须的)
- 禁止使用细描边(Hero必须3px,h1/h2至少2px)

## Output Guidance
- 先保证整体风格识别度,再优化细节。
- 避免过度炫技,保持可读性与可维护性。

设计哲学

Liquid Glass(流动玻璃)是 Apple WWDC 2025 发布的革命性设计语言,超越传统毛玻璃效果,通过光线折射、彩虹边缘和流体动画创造出真正有机、流动的视觉体验。

核心理念: - 霓虹描边文字:标题使用 text-stroke 配合青色发光描边,产生霓虹效果 - 渐变填充文字:紫色到品红的渐变填充,配合 3D 阴影产生立体感 - 彩虹折射边缘:边缘呈现棱镜效果,红橙黄绿青蓝紫的光谱渐变 - 流体形变:圆角随交互产生液态变形动画 - 多层深度:3+ 层玻璃堆叠产生丰富的空间层次 - 高饱和度:backdrop-saturate-180 让背景色彩更加鲜艳

## 字体设计核心(最重要的视觉元素)

### Hero 标题(主标题) 紫色渐变填充 + 粗青色描边(3px) + 3D偏移阴影: - background: linear-gradient(to right, #a855f7, #ff2d92, #a855f7) - -webkit-text-stroke: 3px #4ecdc4 - text-shadow: 4px 4px 0 rgba(0,0,0,0.5), 0 0 20px rgba(78,205,196,0.5), 0 0 40px rgba(168,85,247,0.3) - filter: drop-shadow(0 0 15px rgba(78,205,196,0.4))

### 副标题(青色发光) 白色/青色文字 + 发光效果(无描边): - color: white 或 gradient cyan - text-shadow: 0 0 20px rgba(78,205,196,0.8), 0 0 40px rgba(78,205,196,0.4), 2px 2px 0 rgba(0,0,0,0.3)

### h1/h2 标题 较细描边(2px) + 发光 + 轻微3D: - -webkit-text-stroke: 2px #4ecdc4 - text-shadow: 3px 3px 0 rgba(0,0,0,0.4), 0 0 15px rgba(78,205,196,0.4)

### 正文 高对比度白色,保证可读性: - color: text-white/80 到 text-white/90

与 Glassmorphism 的区别: | 特性 | Glassmorphism | Liquid Glass | |------|---------------|--------------| | 边框 | border-white/20 | 彩虹渐变边框 | | 模糊 | blur-2xl | blur-3xl + saturate-180 | | 动画 | 简单过渡 | 液态形变 morph | | 深度 | 单层 | 多层堆叠 | | 文字 | 普通白色 | 渐变+粗描边+3D阴影 | | 描边 | 无 | 3px青色霓虹描边 | | 阴影 | 普通投影 | 3D偏移+发光组合 |

必须做 / Do's

  • +Hero标题使用粗描边 -webkit-text-stroke: 3px #4ecdc4
  • +Hero标题使用3D偏移阴影 text-shadow: 4px 4px 0 rgba(0,0,0,0.5)
  • +Hero标题使用渐变填充 bg-gradient-to-r from-[#a855f7] via-[#ff2d92] to-[#a855f7]
  • +副标题使用青色发光 text-shadow: 0 0 20px rgba(78, 205, 196, 0.8)
  • +使用超高模糊值 backdrop-blur-[40px] 或 backdrop-blur-3xl
  • +添加饱和度增强 backdrop-saturate-[1.8] 或 backdrop-saturate-200
  • +使用彩虹渐变边框模拟光线折射效果
  • +使用超大圆角 rounded-3xl 或 rounded-[24px]
  • +使用流体动画 transition-all duration-500 ease-out

禁止做 / Don'ts

  • -禁止使用普通白色标题(必须使用渐变+粗描边+3D阴影)
  • -禁止省略3D偏移阴影(4px 4px是必须的)
  • -禁止使用细描边(Hero必须3px,h1/h2至少2px)
  • -禁止省略文字发光效果(缺少霓虹感)
  • -禁止使用低模糊值 backdrop-blur-sm(太弱)
  • -禁止省略饱和度增强(颜色会显得暗淡)
  • -禁止使用直角或小圆角(rounded-none, rounded-sm)
  • -禁止使用快速过渡(duration-100, duration-150)

组件模板

组件预览

按钮

流动玻璃按钮,具有彩虹边缘渐变和液态压缩效果

Spatial UI
tsx
<button className="
  group relative overflow-hidden px-8 py-4
  bg-white/10 backdrop-blur-[40px] backdrop-saturate-[1.8]
  rounded-[20px]
  text-white font-medium
  before:absolute before:inset-0 before:-z-10 before:rounded-[20px]
  before:bg-gradient-to-r before:from-[#ff6b6b] before:via-[#4ecdc4] before:to-[#a855f7]
  before:p-[1px]
  after:absolute after:inset-[1px] after:-z-10 after:rounded-[19px] after:bg-white/10
  border border-white/20
  shadow-[0_8px_24px_rgba(0,0,0,0.12)]
  hover:bg-white/15 hover:border-white/40
  hover:shadow-[0_18px_42px_rgba(0,0,0,0.22)]
  hover:scale-[1.02]
  active:scale-95
  transition-all duration-500 ease-[cubic-bezier(0.25,1,0.5,1)]
">
  <span className="pointer-events-none absolute inset-0 -translate-x-[130%] skew-x-[-20deg] bg-gradient-to-r from-transparent via-white/30 to-transparent transition-transform duration-700 ease-out group-hover:translate-x-[130%]" />
  <span className="relative z-10">Spatial UI</span>
</button>

全局样式

全局 CSS

css
/* Liquid Glass 全局样式 */

/* 流动玻璃变量 */
:root {
  --liquid-glass-bg: rgba(255, 255, 255, 0.1);
  --liquid-glass-bg-hover: rgba(255, 255, 255, 0.15);
  --liquid-glass-blur: 40px;
  --liquid-glass-saturate: 1.8;
  --liquid-glass-border-start: #ff6b6b;
  --liquid-glass-border-mid: #4ecdc4;
  --liquid-glass-border-end: #a855f7;
}

/* 彩虹边框渐变 */
.liquid-glass-rainbow-border {
  background: linear-gradient(
    135deg,
    var(--liquid-glass-border-start) 0%,
    #ffd93d 25%,
    #6bcb77 50%,
    var(--liquid-glass-border-mid) 75%,
    var(--liquid-glass-border-end) 100%
  );
}

/* 基础流动玻璃类 */
.liquid-glass {
  background: var(--liquid-glass-bg);
  backdrop-filter: blur(var(--liquid-glass-blur)) saturate(var(--liquid-glass-saturate));
  -webkit-backdrop-filter: blur(var(--liquid-glass-blur)) saturate(var(--liquid-glass-saturate));
  border-radius: 24px;
}

/* 顶部高光条 */
.liquid-glass-highlight {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background-image: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.2),
    transparent 50%
  );
}

/* 流体形变动画 */
@keyframes liquid-morph {
  0%, 100% { border-radius: 24px; }
  25% { border-radius: 28px 20px 26px 22px; }
  50% { border-radius: 22px 26px 20px 28px; }
  75% { border-radius: 26px 22px 28px 20px; }
}

.liquid-glass-morph {
  animation: liquid-morph 8s ease-in-out infinite;
}

/* 脉冲发光动画 */
@keyframes liquid-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(168, 85, 247, 0.3); }
  50% { box-shadow: 0 0 40px rgba(168, 85, 247, 0.5); }
}

.liquid-glass-glow {
  animation: liquid-glow 3s ease-in-out infinite;
}

/* 彩虹边缘脉冲 */
@keyframes rainbow-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.liquid-glass-rainbow-pulse {
  animation: rainbow-pulse 2s ease-in-out infinite;
}

/* 多层玻璃堆叠 */
.liquid-glass-stack-1 { --liquid-glass-bg: rgba(255, 255, 255, 0.08); }
.liquid-glass-stack-2 { --liquid-glass-bg: rgba(255, 255, 255, 0.12); }
.liquid-glass-stack-3 { --liquid-glass-bg: rgba(255, 255, 255, 0.16); }

/* 深色渐变容器背景 */
.liquid-glass-container {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
  min-height: 100vh;
}

无障碍

无障碍评分

基于颜色对比度和排版可读性的 WCAG 2.1 合规分析。

60

综合评分

等级: C - 一般

对比度

分数: 43/100平均比率: 7.49:1
AA 未通过AAA 未通过
场景颜色比率AAAAA
Text on accent 1
/#ffffff / #1a1a2e
17.06:1
Text on accent 2
/#ffffff / #ff2d92
3.48:1
Text on accent 3
/#ffffff / #4ecdc4
1.93:1

可读性

分数

100/100

字号

text-sm md:text-base

字重

font-black bg-gradient-to-r from-[#a855f7] via-[#ff2d92] to-[#a855f7] bg-clip-text text-transparent

行高

default

评分基于 WCAG 2.1 标准。AA 级要求普通文本对比度 4.5:1、大文本 3:1;AAA 级要求普通文本 7:1、大文本 4.5:1。

IDE 集成

IDE 配置导出

下载 AI 编码助手的配置文件,使其按照此风格生成代码。

风格包

导出风格包

获取完整的可机器读取风格资源,包括 Design Tokens、Tailwind 预设、CSS 变量和 shadcn/ui 主题。

Metadata

Style metadata including version information

Design Tokens

Figma / Style Dictionary / Tokens Studio 兼容

Tailwind Preset

Tailwind CSS 主题预设,可直接在配置中引用

Global CSS

包含 CSS 变量和基础样式

shadcn Theme

shadcn/ui 主题配置

CSS Variables

纯 CSS 变量,适用于任何项目

SKILL.md

可加载到 Cursor / Claude Code / VS Code 的技能包

社区

评分与反馈

登录后评分
0 条评论
登录后才能发表评论。 去登录

StyleKit

精选网页设计风格库,帮助 AI 生成更好看的网站。

导航

风格库模板对比

资源

GitHub 仓库

(c) 2026 StyleKit. 开源项目。

基于 Editorial 风格构建