Box Shadow Generator

Design CSS box-shadow effects with a live preview - copy the code in one click.

Shadow editor Live preview updates as you drag
X offset5px
Y offset5px
Blur15px
Spread0px
Shadow color#000000
Opacity25%
Presets
Preview & code Shadow applied to the card below
Card

      

Box Shadow Generator / 阴影生成器

Design CSS box-shadow effects visually: drag sliders for X/Y offset, blur and spread, pick the shadow color and opacity, toggle inset mode, and copy the finished declaration to your stylesheet. The white card previews every change in real time. 在线 CSS 阴影生成器:拖动滑块设置偏移、模糊、扩散,选择颜色与不透明度,切换内阴影,实时预览并一键复制 box-shadow 声明。

Anatomy of a shadow / 阴影参数解析

  • X / Y offset - where the shadow falls; large values look dramatic 阴影落点
  • Blur - softens the edges; most natural shadows are 8-30px 模糊柔化边缘
  • Spread - grows or shrinks the shadow footprint 扩大或收缩范围
  • Color + opacity - colored shadows (e.g. brand-blue) look modern 彩色阴影更现代
  • Inset - renders the shadow inside the element, for pressed states 内阴影适合按下效果

box-shadow vs text-shadow / 与 text-shadow 的区别

The same coordinate system works for text-shadow - copy the X/Y/blur values and use them on text for drop-shadow captions. 相同的坐标系统也适用于 text-shadow,可复制前三个数值给文字使用。

Privacy / 隐私说明

All shadow calculations happen in your browser. No data is sent anywhere. 阴影生成全部在浏览器本地完成,不会发送任何数据。

FAQ / 常见问题

Q: Why does my shadow look harsh? / 为什么阴影生硬? - Add blur (10px+) and lower the opacity; soft, semi-transparent shadows read as natural light. 增加模糊并降低不透明度更自然。

Q: Can I stack multiple shadows? / 能叠加多层阴影吗? - Yes, paste several comma-separated box-shadow values in your CSS; generate each layer here. 可以,用逗号分隔多层生成。

Related tools / 相关工具