2018-10-12 19:37:13 +00:00
|
|
|
---
|
|
|
|
title: Make Circular Images with a border-radius
|
|
|
|
---
|
|
|
|
## Make Circular Images with a border-radius
|
|
|
|
|
2018-10-31 18:56:51 +00:00
|
|
|
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
|
|
|
|
We need to give our cat photo a ```border-radius``` of ```50%```.
|
2018-10-12 19:37:13 +00:00
|
|
|
|
2018-10-31 18:56:51 +00:00
|
|
|
### Solution
|
2018-10-12 19:37:13 +00:00
|
|
|
|
2018-10-31 18:56:51 +00:00
|
|
|
In class ```smaller-image``` add a ```border-radius``` of ```50%```:
|
|
|
|
|
|
|
|
```css
|
|
|
|
.smaller-image {
|
|
|
|
width: 100px;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
This class already assigned to our ```img``` element and making it perfectly circular.
|