🔷 CSS Pattern Generator
📐 計算公式 / 原理
CSS 圖案:triangles 用 45° 線性漸變雙層、第二層錯位 size ÷ 2;diamonds 用 conic-gradient 從 45° 起四象限交替;scales(鱗片)用上下錯位徑向圓、瓦片 size × (size×0.6);chevron 四向 135° / 225° / 45° / 315° 組合;circles 徑向圓環:中心透明 0–12%、環帶 12–20%、外部透明;grid(網格)用橫豎線性漸變滿鋪
基於 CSS 線性 / 徑向 / 錐形漸變生成三角形、鱗片、V 形、圓環、菱形與網格無縫紋理;調節大小與兩種顏色後匯出可貼上的 CSS background 宣告,用於網頁裝飾。
📚 深度解析:圖案生成器
💡 常見使用場景
- 網頁背景。
- 卡片底紋。
- 活動頁裝飾。
生成圓環背景
❓ 常見問題(FAQ)
- 接縫怎麼避免?
- 引數取整除週期可無縫;否則會出現可見接縫。
- 密度怎麼調?
- 調整圖案大小與顏色;尺寸越小越密,顏色對比越強越清晰。
- 會儲存或上傳我的內容嗎?
- 結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Pattern tile | CSS background-size controls the pattern tile repeat pitch | CSS Backgrounds and Borders Level 3 |
| Seamless repeat | align each tile edge with its neighbours to avoid seams | CSS Backgrounds and Borders Level 3 |
| Alpha stacking | overlapping translucent shapes blend as foreground x a plus background x (1 - a) | CSS Color Module Level 4 |
⚠️ 使用說明與注意事項
- 本工具純前端執行,資料不會上傳到伺服器
- 建議在主流瀏覽器(Chrome/Safari/Firefox/Edge)中使用
- 計算結果僅供參考,請以實際應用場景為準