This content originally appeared on Bram.us and was authored by Bramus!
Nice work by Chris: when you crossfade an image — using the proprietary -webkit-cross-fade()
— with a transparent gif, you can create semi-transparent background images.
.el {
background-image: -webkit-cross-fade(
url(image.jpg),
url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7), /* transparent GIF, base64 encoded */
50%
);
Clever! WebKit/Chromium based browsers only though (i.e. no Firefox)
Maybe there kinda is background-opacity? →
This content originally appeared on Bram.us and was authored by Bramus!
Bramus! | Sciencx (2021-12-21T00:15:30+00:00) Create semi-transparent CSS background images by crossfading them with a transparent GIF. Retrieved from https://www.scien.cx/2021/12/21/create-semi-transparent-css-background-images-by-crossfading-them-with-a-transparent-gif/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.