🌃 Advanced Shadow Generator
📐 工作原理與說明
單層:顏色 #RRGGBB 按位切片 parseInt(...,16) 得 r/g/b,拼為「x px y px blur px spread px rgba(r,g,b,alpha)」;多層用逗號連線後輸出 box-shadow: …;,並即時應用到預覽方塊
高階陰影 = 多條 box-shadow 疊加(多層外陰影營造景深,inset 內陰影營造凹陷)或 drop-shadow 濾鏡;逐層調節模糊與擴散並預覽,用於卡片與按鈕層次。
Fine-tune multi-layer outer and inner shadows with blur and spread and copy advanced box-shadow or drop-shadow CSS.
Shadow
📚 深度解析:高階陰影生成器
💡 常見使用場景
- 高階卡片。
- 霓虹發光。
- 擬物陰影。
生成彩色發光
❓ 常見問題(FAQ)
- 效能注意?
- 多層大模糊陰影渲染成本高,複雜場景適當減少層數。
- 怎麼做彩色陰影?
- 用多層不同色 shadow 疊加即可出彩色或發光效果,注意層數效能。
- 會儲存或上傳我的內容嗎?
- 結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Stacking order | shadows paint in source order, the first one on top clipping the rest | CSS Backgrounds and Borders Level 3 |
| Blur kernel | the blur radius equals twice the Gaussian sigma | Filter Effects Module Level 1 |
| Spread contraction | negative spread contracts the shadow into a hairline | CSS Backgrounds and Borders Level 3 |
⚠️ 使用說明與注意事項
- 本工具純前端執行,資料不會上傳到伺服器
- 建議在主流瀏覽器(Chrome/Safari/Firefox/Edge)中使用
- 計算結果僅供參考,請以實際應用場景為準