A worked example, rendered from real sample data. Sign in to run the tool on your own input.
size=56px bg=#6366f1 shape=circle ring=1.avatar {
width: 56px; height: 56px;
border-radius: 50%;
background: #6366f1;
color: #fff; display: inline-flex; align-items: center; justify-content: center;
font-weight: 600; font-size: calc(56px * 0.4);
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }Circular/square avatar with initials, ring, image fallback. Part of the DevTools Surf developer suite. Browse more tools in the CSS collection.