Terence Eden. He has a beard and is smiling.
Theme Switcher:

Overlapping Animated GIFs

· 2 comments · 200 words · Viewed ~12,504 times


Just a couple of silly experiments on a Sunday afternoon.

I think it's beautiful to overly animated GIFs on top of one another. If the topmost GIF has a transparent background it becomes hypnotic to see the synchronisity which appears to develop - akin to listening to Dark Side of the Moon while the Wizard of Oz is on the TV.

infinite loop2

The background and foreground have differing periods of motion, which gives a rather pleasing effect.

It's also possible to overlay GIFs to use as sprites. In this example, there's an animated background image (I got bored moving the clouds!), the ? blocks are separate GIFs positioned with CSS, as are the Goomba and Mario.

If you click on the frame, you can control Mario with your left and right cursor keys.

The movement and flipping is controlled with JavaScript altering the CSS of the image. The code itself is rather trivial - and I haven't added any collision detection - but it's works fairly well. You probably wouldn't want to build an entire game this way, but it's quite fun to see what's possible with just a couple of lines of code.


Share this post on…

2 thoughts on “Overlapping Animated GIFs”

    1. Nope! Click the links under the gifs to go to the original author's post.

      Reply

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

See allowed HTML elements: <a href="" title="">
<abbr title="">
<acronym title="">
<b>
<blockquote cite="">
<br>
<cite>
<code>
<del datetime="">
<em>
<i>
<img src="" alt="" title="" srcset="">
<p>
<pre>
<q cite="">
<s>
<strike>
<strong>

To respond on your own website, write a post which contains a link to this post - then enter the URl of your page here. Learn more about WebMentions.