Is it possible to create a perfect circle image regardless of its original dimensions, such as not being a perfect square like 100px x 100px
?
.circle {
border-radius: 50%;
height: 100px;
width: 100px;
}
Using the above code, if the image size is 200x150, the img
tag would be in an oval shape. Is there a way to always achieve a perfect circle no matter what the image size?
<img class="circle" src="/link/to/img.jpg" height="80" width="80" />