⭕ 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
⚠️ 使用说明与注意事项