Using an <img>
tag:
Use border-radius: 50%. The size of the source image will determine the size of the circle.
HTML:
<img class="circular-img" src="http://placehold.it/150x150" /> |
CSS:
.circular-img { |
Result:
Using a <div>
with a background image:
The idea is the same, but you will need to specify the size of the image in the CSS and add a few background CSS directives.
HTML:
<div class="circular-div default-image-background"></div> |
CSS:
.circular-img { |
Result: