freeCodeCamp/guide/english/certifications/responsive-web-design/basic-css/make-circular-images-with-a.../index.md

21 lines
546 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Make Circular Images with a border-radius
---
## Make Circular Images with a border-radius
<!-- 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
### Solution
2018-10-12 19:37:13 +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.