How does this CSS produce a circle?

This is the CSS:

div {
    width: 0;
    height: 0;
    border: 180px solid red;
    border-radius: 180px;
}

How does it produce the circle below?

Enter image description here

Suppose, if a rectangle width is 180 pixels and height is 180 pixels then it would appear like this:

Enter image description here

After applying border-radius 30 pixels it would appear like this:

Enter image description here

The rectangle is becoming smaller, that is, almost going to disappear if the radius size increases.

So, how does a border of 180 pixels with height/width-> 0px become a circle with a radius of 180 pixels?

5 Answers
5

Leave a Comment