⭕ Border Radius Generator

📐 工作原理與說明
四角取值完全相同時輸出單值寫法 border-radius: 左上 + 單位;否則按 左上、右上、右下、左下 的順序輸出四值寫法;單位由所選單位決定(px 或 % 等);演示框同步設定 borderRadius 屬性即時預覽
四角半徑分別對映為 CSS border-radius 的左上 / 右上 / 右下 / 左下值,即時預覽並生成宣告;支援獨立設定各角,用於前端圓角樣式落地。

Drag to set the corner radius of an element and copy ready-to-use CSS border-radius, with independent control of all four corners.

Border Radius

📚 深度解析:圓角生成器

💡 常見使用場景

  • 調卡片、按鈕、頭像的圓角。
  • 做不規則有機形狀(花瓣/水滴)。
  • 統一設計系統的圓角 token。
生成左上 24px、右下 50% 圓角

輸入:TL 24px、TR 8px、BR 50%、BL 8px。

處理:拼接 border-radius 簡寫。

輸出:即時預覽與 border-radius:24px 8px 50% 8px; 程式碼。

❓ 常見問題(FAQ)

百分比是相對什麼?
相對元素自身的寬高,因此方形與長條形會得到不同弧度。結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。
生成的程式碼/圖片能直接用嗎?
可直接複製使用,建議粘到專案後在瀏覽器實測微調;本工具只生成不託管。
會儲存或上傳我的內容嗎?
結果以瀏覽器即時計算為準,純前端本地處理、資料不上傳;生成的樣式與程式碼僅作快速產出參考,正式專案請以設計系統、規範與瀏覽器實測為準。

Formula & Standard References

Item Formula / Note Source / Standard
Syntax border-radius takes one to four radii or slash-separated pairs CSS Backgrounds and Borders Level 3
Overflow handling when radii exceed the side length they scale down proportionally CSS Backgrounds and Borders Level 3
Clipping rounding clips backgrounds and overflow content CSS Backgrounds and Borders Level 3
⚠️ 使用說明與注意事項