Design
Implementation
Avatar - Implementation
Avatar is used to show the users profile picture
Basic Avatar
This is what the implementation of an avatar would look like. Below is the HTML and CSS, as well as an example of what the code will produce.
<div class="avatar">
<img alt="Profile Avatar" class="avatar__image" decoding="async" loading="lazy" src="/image-big.jpg" srcset="/image-small.jpg 480w, /image-medium.jpg 800w, /image-big.jpg 1200w" />
</div>

.avatar {
display: flex;
}
.avatar__image {
background-color: #dadce0;
border-radius: 50%;
-ms-flex-negative: 0;
flex-shrink: 0;
height: 64px;
margin: 0 12px 0 0;
-o-object-fit: cover;
object-fit: cover;
overflow: hidden;
width: 64px;
}
Contents