iframe{margin:0px;mix-blend-mode: screen; /* Blend mode to make black transparent */}

The other day I was exploring Are.na and saw a lovely gif. I’ve been thinking about the animations created by Ade that are quite analogue and wonder-filled, example. I had thought about some sort of JavaScript & css version the would show a transparent gif over a slideshow of images. I’d tried a few but none looked very nice. This new gif looked amazing and I downloaded it and incorporated it a file I was testing. It looked a lot better than my other efforts.

Thinking to publish this experiment, I started trying to find the original to see how it was licensed. Are.na has a nice feature where you can pass an image to a Google search. This didn’t turn up anything useful except a Pinterest link to a YouTube video. This must have been the source of the gif.

In my testing I’d used the css mix-blend-mode to make the black areas of the gif transparent, so I wondered about the video. Turns out if you target the iframe that is YouTube video embed code that works too. The image behind swaps out every 3 seconds.

Compare with the original video & with the background on a separate page: Transparent Youtube.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post's permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post's URL again. (Find out more about Webmentions.)