玻璃拟态设计提示词
用于创建毛玻璃 UI 效果的 AI 提示词,涵盖 backdrop-blur、透明度和层叠深度。
glassmorphism promptglass effect CSS promptfrosted glass UIglassmorphism Tailwindbackdrop blur designglass card design prompt
关于此主题
玻璃拟态通过 CSS backdrop-filter: blur()、半透明背景和微妙边框创造毛玻璃效果。由 Apple 的 macOS 和 iOS 界面推广,这种风格通过层叠半透明表面创造深度感。有效玻璃拟态的关键是有一个活跃的背景(渐变或图像),透过模糊的玻璃层显现,在不造成视觉杂乱的情况下创造视觉丰富度。
提示词示例
AI 提示词示例
复制这些提示词,用你喜欢的 AI 工具生成玻璃拟态设计提示词设计。
玻璃卡片布局
GeneralCreate a glassmorphism card layout over a gradient background. Background: linear-gradient from #667eea to #764ba2. Cards: background rgba(255,255,255,0.15), backdrop-filter blur(12px), border 1px solid rgba(255,255,255,0.2), border-radius 16px. Each card contains an icon, title, and description. Arrange in a 3-column responsive grid. Add subtle box-shadow for depth. Text in white with varying opacity for hierarchy.
v0 玻璃仪表盘
v0Build a glassmorphism dashboard using shadcn/ui. Background with a mesh gradient (purple, blue, teal). All cards use backdrop-blur-xl with bg-white/10 borders border-white/20. Include: floating stat cards, a glass navigation bar at the top, and a profile dropdown with glass effect. Use rounded-2xl for all containers. Text hierarchy through white text opacity levels: headings 100%, body 80%, muted 50%.
Cursor Apple 液态玻璃
CursorImplement an Apple-inspired liquid glass design system in Next.js with Tailwind. Create a glass() utility that applies: bg-white/10 dark:bg-black/10, backdrop-blur-2xl, border border-white/20, shadow-lg. Build a modal, dropdown, sidebar, and tooltip using this glass treatment. The background should be a gradient with floating colored orbs (CSS radial-gradient) that create dynamic color through the glass effect.
Claude 玻璃 UI
ClaudeGenerate React components with glassmorphism styling. Create GlassCard, GlassButton, GlassInput, GlassModal, and GlassNavbar components. Each uses: backdrop-filter: blur(16px), background: rgba(255,255,255,0.1), border: 1px solid rgba(255,255,255,0.18). Include hover states that increase background opacity. Support both light glass (white-based) and dark glass (black-based) variants. Use Tailwind CSS with custom utility classes.
玻璃质感音乐播放器
GeneralDesign a glassmorphism music player card. The album art fills the card background; the control panel sits on top as a glass layer: background rgba(255,255,255,0.12), backdrop-filter blur(20px) saturate(160%), border 1px solid rgba(255,255,255,0.25), border-radius 24px. Progress bar: 4px track at rgba(255,255,255,0.2) with a solid #ffffff fill and a 12px thumb. Track title 18px semibold white, artist 14px at 70% opacity. Play button: 56px solid white circle with dark icon for contrast; skip buttons are glass circles. Ensure all controls have aria-labels and at least 44px touch targets, and keep text over blur at 4.5:1 contrast by darkening the glass behind it if needed.
v0 玻璃定价卡片
v0Build a glassmorphism pricing section with shadcn/ui. Background: a fixed mesh gradient of #7c3aed, #2563eb, and #0ea5e9 orbs on #0f0a1e. Three tier cards: backdrop-blur-2xl bg-white/10 border border-white/20 rounded-3xl p-8, with the Pro tier using bg-white/15 and a brighter border-white/40 plus a solid white CTA button with #1e1b4b text. Price at 48px tabular-nums in white, features as a list with check icons at 80% opacity. Card hover lifts with translate-y-1 and increases background to /15 over 200ms. Keep body copy at white/85 minimum for contrast and give the section a solid fallback background via @supports not (backdrop-filter: blur(1px)).
Cursor 玻璃引导流程
CursorCreate a 3-step onboarding flow in Next.js with a glassmorphism panel centered over an animated gradient (conic-gradient rotating slowly between #f472b6, #818cf8, #34d399, 30s linear, paused under prefers-reduced-motion). Panel: 480px wide, rgba(255,255,255,0.08) with blur(24px), 1px rgba(255,255,255,0.18) border, 28px radius, 40px padding. Step indicator: three 8px dots, active dot stretches to a 24px pill in white. Inputs are darker glass (rgba(0,0,0,0.2)) so white text hits 4.5:1, with white/90 labels above, never placeholder-only. Buttons: primary solid white with dark text, secondary glass outline. Animate step transitions with a 250ms fade and 16px slide.
Claude 玻璃天气组件
ClaudeGenerate a React weather widget with glassmorphism styling and TypeScript props for condition, temperature, and hourly forecast. Container: 360px card, background rgba(255,255,255,0.14), backdrop-filter blur(18px), border 1px solid rgba(255,255,255,0.28), border-radius 20px, over a sky gradient that shifts by condition (clear: #38bdf8 to #0369a1; night: #1e293b to #020617). Temperature at 64px light weight, condition label 16px at 85% opacity, hourly row of 6 glass chips (rgba(255,255,255,0.1), 12px radius) with 13px labels. Use SVG weather icons with 1.5px white strokes. Include role=region with an aria-label like 'Current weather', and a solid rgba(30,41,59,0.9) fallback when backdrop-filter is unsupported.
相关风格
相关风格
探索这些风格获取现成的 tokens 和组件。
适用场景
最佳使用场景
音乐媒体播放器
专辑封面透过玻璃控件显现,创造沉浸式听觉体验。
天气应用
天气状况通过玻璃覆层可见,配合动态天空背景。
Hero 覆层
玻璃卡片浮在落地页的 Hero 图片或视频背景之上。
macOS/iOS 风格应用
遵循 Apple 设计语言的桌面和移动应用,使用半透明面板。
常见问题
常见问题解答
什么是网页设计中的玻璃拟态?
玻璃拟态是一种模拟毛玻璃的设计风格,使用 CSS backdrop-filter: blur()、半透明背景(rgba)和微妙的亮色边框。它通过在活跃背景上层叠半透明表面来创造深度感。这种效果通过 Apple 的 macOS Big Sur 和 iOS 设计更新而成为主流。
如何用 Tailwind CSS 创建玻璃拟态?
使用这些 Tailwind 类:'backdrop-blur-xl bg-white/10 border border-white/20 rounded-2xl shadow-lg'。暗色玻璃:'backdrop-blur-xl bg-black/10 border border-white/10'。关键是在玻璃元素后面要有彩色背景。添加 'backdrop-saturate-150' 获得更丰富的色彩透出。
玻璃拟态会影响性能吗?
backdrop-filter 可能影响渲染性能,尤其是在移动设备上使用大模糊值时。缓解策略:限制模糊值为 12-20px、避免嵌套多个玻璃层、在玻璃元素上使用 will-change: transform、为不支持 backdrop-filter 的浏览器提供纯色回退。现代浏览器在典型使用场景下处理良好。
玻璃拟态的 backdrop blur 应该用多大?
最佳区间是 blur(12px) 到 blur(24px)。低于 8px 时背景仍然清晰可辨,会和前景文字抢注意力;超过 30px 表面就像不透明的磨砂塑料,玻璃错觉消失了,渲染开销却一分不少。按元素尺寸调整:小型标签和按钮 10-12px 合适,卡片 16-20px,全屏弹窗和导航栏 20-24px。将 blur 与 saturate(150%-180%) 搭配,让透出的色彩保持鲜活而不是发灰。移动端整体降一档(如 20px 降到 12px)以保住帧率。
为什么我的玻璃拟态效果看起来浑浊或没有效果?
常见原因有三个。第一,背景太平:玻璃需要背后有彩色渐变或图像——在纯白或纯灰上,blur 没有东西可以扩散,应加入渐变光斑或 mesh 背景。第二,填充不透明度不对:rgba(255,255,255,0.4) 以上会完全遮住背景,应保持在 0.08-0.2 区间。第三,缺少边框:1px solid rgba(255,255,255,0.2) 的边缘正是「玻璃片」质感的来源——没有它卡片会融进背景里。另外确认 backdrop-filter 没有失效:某些浏览器中祖先元素同时设置 overflow 和 transform 会破坏该属性。