JT Book a call

Blog

How to create circles in CSS

Published

1 min read

How to create circles in CSS
In this post

Let’s look at a few tricks in CSS able to create basic shapes like circles.

<div class="circle"></div>

Border-Radius #

For this case need to use the border-radius property and set the value to 50%. Then combine the height and width properties with a matching value.

.circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: lightgreen;
}

Image description

Circle() #

In this, the circle is created using the shape-outside property. You must also apply a clip-path with the appropriate property to make the circle appear.

.circle {
  width: 100px;
  height: 100px;
  clip-path: circle();
  shape-outside: circle();
  background: yellow; 
}

Image description

Read next

Tell us whatyou need built

JetThoughts has been building software since 2008. Book a call, or write to sales@jetthoughts.com. You'll leave the call with a written one-page scope within 2 working days.

Paul Keen Paul Keen, founder

A 30-minute call; pick a time.