The CSS border-radius property rounds the corners of an element's border box.
The CSS `border-radius` property rounds an element’s corners. Give it a measurement: the higher the value, the rounder the corners. A percentage works too; `50%` can make a circular shape. section 20.5
Round a navigation button
A portfolio page gives its navigation links the `btn` class. The rule `.btn { border-radius: .75rem; }` softens their corners. Background color and padding help the links look like buttons rather than plain text. section 20.5
How Web Design Playground, Second Edition covers it
How deep it goes
Defines the property, compares measurement and percentage values, and shows one CSS rule; does not develop more detailed corner settings.
Examples
Shows a `.btn` rule using `border-radius: .75rem` on portfolio navigation links.
What it assumes
Uses HTML links and a CSS class rule while introducing corner rounding directly.
What you can do after
Operate/configure it by choosing a measurement or percentage to round an element’s corners.
How it connects
Connects CSS classes and HTML links with background color and padding in button styling.
style propertykind of · A style property is a named setting or interface attribute that specifies or exposes a presentation characteristic of an element or view.
cardconfigures · A card is a reusable user-interface component that presents related information and controls in a compact, visually distinct unit.
circleconfigures · A circle is a plane curve consisting of points at a fixed distance from a common center.
emconfigured by · The em is a CSS relative length unit whose computed value is based on the applicable font size.
shorthand propertyuses · A CSS shorthand property sets multiple related longhand properties in a single declaration, resetting omitted properties to their initial values.
This explainer was generated by Manning's knowledge graph from the text of Web Design Playground, Second Edition. The section links point to the parts of the book it draws on.