🔄 Sharp Corners Look Amateur
Rounded corners = modern design. border-radius rounds corners. Cards, buttons, images — softer, friendlier.
📝 Border Radius Syntax
/* All corners */
border-radius: 8px;
/* Individual corners */
border-radius: 4px 8px 12px 16px; /* top-left, top-right, bottom-right, bottom-left */
/* Different horizontal and vertical */
border-radius: 20px 10px; /* 20px horizontal, 10px vertical */
/* Specific corners (longhand) */
border-top-left-radius: 8px;
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
/* Circle (50% radius) */
.circle {
border-radius: 50%;
width: 100px;
height: 100px;
}
/* Pill shape */
.pill {
border-radius: 50px;
padding: 10px 20px;
}
🎯 Practical Examples
/* Card with rounded corners */
.card {
border-radius: 12px;
overflow: hidden; /* Clip content to border radius */
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
/* Avatar image */
.avatar {
border-radius: 50%;
width: 60px;
height: 60px;
object-fit: cover;
}
/* Button */
.button {
border-radius: 8px;
padding: 10px 20px;
}
/* Only top corners rounded */
.card-header {
border-radius: 12px 12px 0 0;
}
/* Asymmetric corners */
.custom {
border-radius: 20px 4px 20px 4px;
}
💡 Performance Note
- border-radius is GPU accelerated (fast)
- Use with overflow: hidden for clipped content
- High border-radius on images (50% circle) is fine
- Works on all modern browsers
“Square corners looked dated. Added border-radius: 8px. Instantly modernized the UI. Small change, big impact.”

