A radius follows the border box. Child backgrounds can still paint outside the curve unless clipping or matching radii are part of the design.
Worked example
<style>
.demo {
border-radius: 1rem;
}
</style>
<div class="demo">Round every corner</div>Implementation notes
A rounded border with an overflowing image is a layering problem. Clip the image wrapper instead of clipping the entire card if keyboard outlines need to escape it.
Try it yourself
Put a contrasting image inside the rounded container.
Open the CSS example →Editorial date July 26, 2025 · Published December 6, 2026