🎨 CSS Box Shadow Generator

Updated: 2026-07-11
Ad Space - Top (728×90)

Free online CSS box-shadow generator. Visually adjust offset, blur radius, spread radius, color, and support inset shadows and multiple layers. Real-time preview, one-click copy CSS code. Perfect for frontend developers and designers. Client-side only.

-50px4px50px
-50px4px50px
0px10px50px
-20px0px20px
0%30%100%

Current: 1 shadow layer

Ad Space - Middle (728×90)

How to Use the CSS Box Shadow Generator

Generate with the CSS Box Shadow Generator in three easy steps:

  1. Configure Your Preferences
    Adjust the settings and options for your css box shadow generator. Choose parameters such as length, complexity, style, or quantity based on your needs.
  2. Click Generate
    Click the "Generate" button to create your content. The tool instantly processes your preferences and produces the result right in your browser — no waiting, no server requests.
  3. Copy or Download the Result
    Review the generated output and click "Copy" to copy it to your clipboard, or "Download" to save it as a file. You can generate as many times as you need with no limits.

FAQ

box-shadow属性中各个参数的含义是什么?

box-shadow属性的完整语法为:box-shadow: offset-x offset-y blur-radius spread-radius color inset。offset-x(水平偏移)正值向右,负值向左;offset-y(垂直偏移)正值向下,负值向上;blur-radius(模糊半径)值越大越模糊;spread-radius(扩散半径)正值放大阴影,负值缩小;color(颜色)设置阴影颜色;inset(可选)将阴影改为内阴影。

如何创建多层阴影效果?

可以通过逗号分隔多个阴影值来创建多层阴影效果,例如:box-shadow: 3px 3px 5px rgba(0,0,0,0.3), -3px -3px 5px rgba(0,0,0,0.1)。本生成器支持添加多层阴影,每层独立调整参数。

内阴影和外阴影有什么区别?

外阴影(默认)绘制在元素边框外侧,用于创建元素浮起的效果。内阴影(inset)绘制在元素边框内侧,用于创建凹陷效果,常用于输入框、按钮按下状态等交互设计。