1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-28 08:10:00 +02:00

feat: Update contents

This commit is contained in:
Phuoc Nguyen
2023-08-19 19:27:15 +07:00
parent f7af6da9e4
commit 71d51b358a
318 changed files with 15536 additions and 6884 deletions

View File

@@ -0,0 +1,65 @@
---
category: Display
created: '2019-12-04'
description: Create an initial avatar with CSS
keywords: css avatar
thumbnail: /assets/css-layout/thumbnails/initial-avatar.png
title: Initial avatar
---
## HTML
```html
<div class="initial-avatar">...</div>
```
## CSS
```css
.initial-avatar {
/* Center the content */
align-items: center;
display: flex;
justify-content: center;
/* Colors */
background-color: #d1d5db;
color: #fff;
/* Rounded border */
border-radius: 50%;
height: 3rem;
width: 3rem;
}
```
<Playground>
```css styles.css hidden
body {
align-items: center;
display: flex;
justify-content: center;
}
.initial-avatar {
/* Center the content */
align-items: center;
display: flex;
justify-content: center;
/* Colors */
background-color: #d1d5db;
color: #fff;
/* Rounded border */
border-radius: 50%;
height: 3rem;
width: 3rem;
}
```
```html index.html hidden
<div class="initial-avatar">
PN
</div>
```
</Playground>