Prepare repository for merge

This commit is contained in:
Angelos Chalaris
2023-05-01 22:51:44 +03:00
parent 334b4dd6f8
commit e49fc829dd
100 changed files with 0 additions and 593 deletions

View File

@ -0,0 +1,36 @@
---
title: Image text overlay
type: snippet
tags: [visual]
author: chalarangelo
cover: mountain-lake-cottage
dateModified: 2021-10-13T19:29:39+02:00
---
Displays a text on top of an image using an overlay.
- Use `backdrop-filter` to apply a `blur(14px)` and `brightness(80%)` effect. This makes text readable regardless of background image and color.
```html
<div>
<h3 class="text-overlay">Hello, World</h3>
<img src="https://picsum.photos/id/1050/1200/800">
</div>
```
```css
div {
position: relative;
}
.text-overlay {
position: absolute;
top: 0;
left: 0;
padding: 1rem;
font-size: 2rem;
font-weight: 300;
color: white;
backdrop-filter: blur(14px) brightness(80%);
}
```