border-radius: 50%
to curve the borders of the element to create a circle.width
and height
must be the same. Differing values will create an ellipse.<div class="circle"></div>
.circle { border-radius: 50%; width: 32px; height: 32px; background: #9C27B0; }
Subscribe to get resources directly to your inbox. You won't receive any spam! ✌️