📇 CSS Card Generator

📐 工作原理與說明
從陰影色十六進位制串取 R = slice(1,3)、G = slice(3,5)、B = slice(5,7) 按 16 進位制解析;卡片樣式:background 取背景色、border-radius = 圓角 px、padding = 內邊距 px、border = 邊框寬 px solid 邊框色、box-shadow = 偏移X px 偏移Y px 模糊 px rgba(R, G, B, 陰影不透明度);演示卡固定寬 260px 並裁剪溢位內容
把圓角、陰影、內邊距與配色引數組合為卡片 CSS(分層 box-shadow + border-radius),即時預覽並可複製;用於落地頁與列表卡片。

Use numeric inputs for radius, shadow, padding and border width, and color pickers for background, border and shadow colors to compose the card CSS; live preview and copyable code for landing pages and lists.

卡片標題

副標題

這是卡片的示例內容,演示生成的樣式效果。

📚 深度解析:卡片生成器

💡 常見使用場景

  • 做內容卡片、商品卡。
  • 統一列表項卡片視覺。
  • 給原型快速套卡片殼。
生成白底圓角卡

輸入:白底、圓角 16px、輕陰影、內距 20px。

處理:組合背景/邊框/陰影。

輸出:卡片預覽與 CSS。

❓ 常見問題(FAQ)

陰影多重合適?
卡片多用單層柔陰影;層級越高陰影越擴散,具體以設計系統為準。結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。
生成的程式碼/圖片能直接用嗎?
可直接複製使用,建議粘到專案後在瀏覽器實測微調;本工具只生成不託管。
會儲存或上傳我的內容嗎?
結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。

Formula & Standard References

Item Formula / Note Source / Standard
Shadow parameters box-shadow takes offset x, offset y, blur, spread and color CSS Backgrounds and Borders Level 3
Radius scaling radii shrink proportionally when their sum exceeds the side CSS Backgrounds and Borders Level 3
Boundary visibility card boundaries need at least 3:1 contrast with the background WCAG 2.2 (1.4.11)
⚠️ 使用說明與注意事項