Gif question...

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
Wolf_22
Forum Contributor
Posts: 159
Joined: Fri Dec 26, 2008 9:43 pm

Gif question...

Post by Wolf_22 »

I have some links in my header of my website that I'm trying to make more attractive by using a tiny gif file that adds visual affect. This gif file is supposed to work like this:

When the user hovers over the image and or link, the image is supposed to display a motion after which the remaining 2 layers of the gif image are supposed to repeat. Keep in mind that the final moment which the mouse remains hovered over the image, it is not in :active mode, but still, in :hover mode.

Can this be done? Have a gif that has only 2 or so images within the entire gif file only repeat while the others are cycled through only once?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Gif question...

Post by pickle »

I've never heard of that being done. I'm pretty sure it can't be.

You might be able to split it up into 2 images. Have one GIF with the frames that only cycle once - include that in the page as a simple image Have the last frame of that animation be all transparent - so it looks like it disappears.. Have a second GIF that consists of the frames that cycle repeatedly. Put that as a background-image in the cells.

If it works, you'd see the <img> cycle through it's frames, then you'd see the background-image.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Re: Gif question...

Post by alex.barylski »

Just use JS maybe a jQuery plugin or something
Wolf_22
Forum Contributor
Posts: 159
Joined: Fri Dec 26, 2008 9:43 pm

Re: Gif question...

Post by Wolf_22 »

I never considered the image idea pickle. That might work with this. The overlying shapes would definitely go together (I think), but since I have to subtly position the CSS background image a bit to the right and from the top, I'm not sure. I'll have to poke around with it--but thanks for that idea. :)

Care to elaborate on that PCSpectra? I'm not too sharp on the jquery stuff, so would you mind going a bit further with that or give me a link to a website that notes something similar?
Post Reply