Locked lesson.
About this lesson
Exercise files
Download this lesson’s related exercise files.
Rounded Corners.docx58.8 KB Rounded Corners - Solution.docx
58.9 KB
Quick reference
Rounded Corners
Let's make some rounded corners!
When to use
Any time you want to use rounded corners, use this code.
Instructions
Make things rounded with the border-radius: property.
border-radius: 30px;
background: blue;
padding: 20px;
width: 300px;
You can designate each corner to be a different radius:
border-top-right-radius: 10px;
border-bottom-right-radius: 20px;
border-top-left-radius: 30px;
border-bottom-left-radius: 12px;
Or you can use shorthand:
border-radius: 10px 20px 30px 40px;
Which stands for: top-left, top-right, bottom-left, bottom-right
Hints & tips
- Rounding borders is fun!
- Use the border-radius property.
- You can use solid backgrounds or outline dotted, dashed, etc.
Lesson notes are only available for subscribers.