Rounded Avatar

Developer
Size
3,263 Kb
Views
58,696

How do I make an rounded avatar?

A simple bit of markup and CSS to create a rounded style of avatars. The styles will accomodate any size of image, scaling the image as needed. The width of the image on the border is set to a ratio of the overall avatar size.. What is a rounded avatar? How do you make a rounded avatar? This script and codes were developed by Mike Fowler on 22 August 2022, Monday.

Rounded Avatar Previews

Rounded Avatar - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Rounded Avatar</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ /* CONFIG */
/* AVATAR */
.avatar { display: inline-block;
}
.avatar__image { display: block; max-width: 100%; margin: 0 auto 10px; border-radius: 45px; box-shadow: 0 0 0 6.3px white, 0 0 10.71px 1px black, 0 9.3px 5px rgba(0, 0, 0, 0.2); width: 77.4px; height: 77.4px;
}
.avatar__label { text-align: center; font-size: 28px;
}
/* PRESENTATION ONLY */
body { color: #222; font-family: Avenir, "Helvetica Neue", sans-serif; text-align: center; padding-top: 50px; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <figure class="avatar"> <img class="avatar__image" src="http://avatars1.dev.findery.com/476742469856/190x190?f8d933981f4a0d336a71a6f3639ff51d" alt=""/> <figcaption class="avatar__label">Mike Fowler</figcaption>
</figure> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Rounded Avatar - Script Codes CSS Codes

/* CONFIG */
/* AVATAR */
.avatar { display: inline-block;
}
.avatar__image { display: block; max-width: 100%; margin: 0 auto 10px; border-radius: 45px; box-shadow: 0 0 0 6.3px white, 0 0 10.71px 1px black, 0 9.3px 5px rgba(0, 0, 0, 0.2); width: 77.4px; height: 77.4px;
}
.avatar__label { text-align: center; font-size: 28px;
}
/* PRESENTATION ONLY */
body { color: #222; font-family: Avenir, "Helvetica Neue", sans-serif; text-align: center; padding-top: 50px; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}

Rounded Avatar - Script Codes JS Codes

(function() {
}).call(this);
Rounded Avatar - Script Codes
Rounded Avatar - Script Codes
Home Page Home
Developer Mike Fowler
Username mikefowler
Uploaded August 22, 2022
Rating 3
Size 3,263 Kb
Views 58,696
Do you need developer help for Rounded Avatar?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Mike Fowler (mikefowler) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!