How to create rounded and circular images with CSS?

CSSWeb DevelopmentFront End Technology

Following is the code to create rounded and circular images with CSS −

Example

 Live Demo

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
img {
   border-radius: 50%;
   width: 300px;
   height: 300px;
}
</style>
</head>
<body>
<h1>Rounded Images Example</h1>
<img src="https://i.picsum.photos/id/271/400/400.jpg">
</body>
</html>

Output

The above code will produce the following output −

raja
Published on 06-Apr-2020 13:32:26
Advertisements