TToolbox
◜

CSS Radius Generator

Build border-radius visually

About this tool

The CSS `border-radius` property defines the curvature, friendliness, and tactile ergonomics of modern web interfaces—ranging from subtle card corner roundings to capsule pill buttons and organic fluid blobs. Beyond simple uniform radiuses, the CSS specification supports sophisticated 8-value syntax separated by slashes (`/`), enabling independent horizontal and vertical radii to construct lifelike droplets and organic shapes. This tool provides visual 4-corner manipulation and instant CSS code generation.

How to Use This Tool (Step-by-Step)

1

Toggle Unified or 4-Corner Mode

Use linked mode to adjust all corners synchronously, or unlock individual control across top-left, top-right, bottom-right, and bottom-left.

2

Modulate Radii in Pixels or Percent

Modulate radius values using pixels or percentages. Enable 8-value elliptical mode to decouple horizontal and vertical curvature axes.

3

Inspect Live Shape & Copy CSS

The interactive canvas reflects the organic geometry in real time. Copy the production-ready `border-radius` snippet with one click.

Full 8-Value Slash Elliptical Syntax

Complete mastery of the full 8-value slash syntax (`H1 H2 H3 H4 / V1 V2 V3 V4`), generating organic morphing blobs with pure CSS.

Nested Radius Proportionality

Applies the concentric nesting rule (`Outer Radius = Inner Radius + Padding`), preventing awkward corner gaps between parent containers and child buttons.

100% Client-Side Air-Gapped

Geometry calculations execute entirely within local browser memory. Proprietary UI design token curves are never logged.

Corner Aesthetics & Cross-Browser Tips

  • •Do not overuse giant radiuses on enterprise dashboards: Huge radiuses eat up internal layout real estate. Use restrained 6px–10px curves on data-dense views.
  • •Always pair rounded containers with `overflow: hidden`: Child banner images will puncture outer container corners unless masked with `overflow: hidden`.
  • •Apple Squircle continuous curvature: iOS uses Lamé curves with continuous second-order derivatives. Emulate via SVG clips or CSS Houdini.

Code & Transformation Examples

Standard UI Component Border Radius Benchmark

UI Components
• 经典卡片与对话框 (Card / Modal) : 12px - 16px (现代主流,温和不失专业)
• 小型按钮与输入框 (Input / Btn)  : 6px - 8px (精致紧凑)
• 胶囊式药丸按钮 (Pill Button)     : 9999px (两端半圆自适应锁死)
• 正圆头像 (Circular Avatar)       : 50% (在 1:1 正方形下呈现完美圆形)
Organic Fluid Blob Syntax
/* 利用斜杠语法生成的灵动不规则液体图形 */
border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%;

* `border-radius: 9999px` guarantees true semi-circular pill ends on rectangles where `50%` produces deformed squashed ovals.

Nested Concentric Border Radius Implementation

Mismatched Radius
/* 外层和内层盲目使用相同的 16px 圆角 */
.parent { padding: 16px; border-radius: 16px; }
.child  { border-radius: 16px; } /* 视觉错位灾难!角上有难看缝隙 */
Concentric Formula
/* 遵循同心圆光学规律 */
.parent { padding: 8px; border-radius: 16px; }
.child  { border-radius: 8px; } /* 16px - 8px = 8px (完美均匀平行流转!) */

* Concentric nested radii (`R_child = R_parent - padding`) create visual harmony without corner pinching.

Frequently Asked Questions

Q: Why does `border-radius` support up to 8 values separated by a slash?

A: Each corner is an ellipse governed by two independent radii. Up to 4 horizontal radii go before the slash, and 4 vertical radii go after it.

Q: What happens if border-radius values exceed the physical box width?

A: Browsers apply corner overlap reduction: If the sum of adjacent radii exceeds element width, all radii are scaled down proportionally to fit.

Q: Can different corner radiuses carry distinct border colors?

A: The radius governs the boundary geometry. Even with asymmetric border widths and colors, the browser interpolates miters smoothly along the curved corner path.

Related Tools

All processing happens locally in your browser. Your data is never uploaded to a server.
/