How do you make a circle using CSS?
Set equal height and width and use border-radius: 50%.
Example:
.circle {
width: 100px;
height: 100px;
background: teal;
border-radius: 50%;
Key Takeaway:
Equal dimensions + border-radius: 50% = perfect circle.
Set equal height and width and use border-radius: 50%.
Example:
.circle {
width: 100px;
height: 100px;
background: teal;
border-radius: 50%;
Key Takeaway:
Equal dimensions + border-radius: 50% = perfect circle.