Creates a circular shape with pure CSS.
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;
}
Would you like to help us improve 30 seconds of code?Take a quick survey
CSS, Visual
Creates a triangular shape with pure CSS.
CSS, Visual
Creates a horizontally scrollable image gallery.
CSS, Visual
Creates a horizontally scrollable image gallery.