HTML & CSS · Junior · Question 69 of 75
How do you make a square avatar image a circle?
- ✓Correct answer:
border-radius: 50%(withobject-fit: coverto avoid distortion) - 2
shape: circle - 3
border-radius: 100pxonly works for circles
Explanation
50% of the width and height turns a square into a circle and a rectangle into an ellipse. object-fit: cover crops non-square photos instead of squashing them.