🎭 CSS Box Shadow Generator
Adjust offset, blur, spread and colour to produce CSS box-shadow code, with multiple layers for layered depth.
📐 計算公式 / 原理
層引數組裝:box-shadow = [inset] Xpx Ypx 模糊px 擴散px rgba(R, G, B, 透明度%);勾選 inset 為內陰影、省略為外陰影;多個圖層以逗號分隔自上而下疊加
按 offset-x / offset-y / blur / spread / color 拼裝 box-shadow 宣告,支援多層疊加與 inset 內陰影,即時預覽並複製;用於元素立體感與層次設計。
📚 深度解析:陰影生成器
💡 常見使用場景
- 做卡片懸浮陰影。
- 做雙層質感陰影。
- 內陰影凹陷效果。
生成柔和投影
❓ 常見問題(FAQ)
- 多層陰影怎麼寫?
- 用逗號分隔多個 shadow 值即可疊加。結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。
- 生成的程式碼/圖片能直接用嗎?
- 可直接複製使用,建議粘到專案後在瀏覽器實測微調;本工具只生成不託管。
- 會儲存或上傳我的內容嗎?
- 結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Parameter order | offset-x, offset-y, blur-radius, spread-radius, colour | CSS Backgrounds and Borders Level 3 |
| Inset shadows | the inset keyword paints the shadow inside the border box | CSS Backgrounds and Borders Level 3 |
| Stacked shadows | earlier shadows in a comma list paint on top and clip later ones | CSS Backgrounds and Borders Level 3 |
⚠️ 使用說明與注意事項
- 本工具純前端執行,資料不會上傳到伺服器
- 建議在主流瀏覽器(Chrome/Safari/Firefox/Edge)中使用
- 計算結果僅供參考,請以實際應用場景為準