CSS Box Shadow生成器
以可视化方式创建CSS box-shadow值。实时预览并复制生成的CSS。
box-shadow: 0px 8px 16px 0px #00000033;
如何使用本工具
- 1
Drag the X offset and Y offset sliders (each from -50px to 50px) to move the shadow horizontally and vertically.
- 2
Adjust the Blur slider (0px to 100px) to soften the edges, and the Spread slider (-50px to 50px) to grow or shrink the shadow.
- 3
Pick a shadow color with the color swatch; the live preview square updates as you change any control.
- 4
Copy the generated box-shadow declaration from the output box at the bottom and paste it into your stylesheet.
什么是CSS Box Shadow生成器?
CSS的box-shadow属性接受水平偏移、垂直偏移、模糊半径、扩展半径和颜色。可以叠加多个阴影来实现分层效果。这款可视化生成器能为任意组合生成CSS:适用于按钮、卡片和景深效果。
常见使用场景
Designing a soft elevation shadow for buttons or cards, then tuning Y offset and blur until the depth looks right.
Prototyping a Material-style shadow by stacking the value this tool outputs with a second hand-written shadow.
Generating a tight, low-blur shadow with negative spread for a crisp focus or hover state.
Getting an exact box-shadow string to paste into a Tailwind arbitrary value, CSS module, or inline style.
Teaching the difference between blur and spread by dragging each slider and watching the preview react.
Quickly matching a shadow from a design mockup by eyeballing offsets against the live preview square.
常见问题
如何叠加多个阴影?▼
模糊和扩展有什么区别?▼
相关工具
颜色转换工具(HEX/RGB/HSL)
在HEX、RGB和HSL格式之间转换颜色。可视化选取颜色,或手动输入数值。
CSS渐变生成器
创建线性和径向CSS渐变。以可视化方式选择颜色,并复制生成的CSS。
Cubic Bezier缓动曲线生成器
为CSS创建cubic-bezier缓动曲线。内置标准预设。
配色方案生成器
从任意基准色生成和谐的配色方案。支持互补色、邻近色、三角色和单色方案。
CSS Border Radius生成器
以可视化方式创建复杂的CSS border-radius值。可独立控制每个圆角。
CSS Clamp()生成器
使用clamp()生成流式、响应式的CSS数值。在视口范围内于最小值与最大值之间平滑缩放。