Class reference

Border Radius - 图1

Rounded corners

Use the .rounded-sm, .rounded, or .rounded-lg utilities to apply different border radius sizes to an element.

Border Radius - 图2

Pills and circles

Use the .rounded-full utility to create pills and circles.

Border Radius - 图3

No rounding

Use .rounded-none to remove an existing border radius from an element.

This is most commonly used to remove a border radius that was applied at a smaller breakpoint.

Border Radius - 图4

Rounding sides separately

Use .rounded-{t|r|b|l}{-size?} to only round one side an element.

Border Radius - 图5

Rounding corners separately

Use .rounded-{tl|tr|br|bl}{-size?} to only round one corner an element.

Border Radius - 图6

Responsive

To control the border radius of an element at a specific breakpoint, add a {screen}: prefix to any existing border radius utility. For example, use md:rounded-lg to apply the rounded-lg utility at only medium screen sizes and above.

For more information about Tailwind’s responsive design features, check out the Responsive Design documentation.

Border Radius - 图7

all

Border Radius - 图8

sm

Border Radius - 图9

md

Border Radius - 图10

lg

Border Radius - 图11

xl

Border Radius - 图12

Customizing

Border Radiuses

By default Tailwind provides five border radius size utilities. You can change, add, or remove these by editing the borderRadius section of your Tailwind config.

Border Radius - 图13

Responsive and State Variants

By default, only responsive variants are generated for border radius utilities.

You can control which variants are generated for the border radius utilities by modifying the borderRadius property in the modules section of your Tailwind config file.

For example, this config will also generate hover and focus variants:

Border Radius - 图14

Disabling

If you don’t plan to use the border radius utilities in your project, you can disable them entirely by setting the borderRadius property to false in the modules section of your config file:

Border Radius - 图15