I've seen a nice image gallery hover effect used quite a lot lately and I'm just wondering whether anybody knows of a good way to recreate such an effect. The effect is when you hover over an image, the image fades out or a div fades in showing links etc over the image.
It's similar to the one found here: http://cssnack.com/ and here: http://designsnack.com/
I've created something similar in the past, but remember having trouble with the opacity fades in IE. Any tips would be great o开发者_C百科r even directions to a good tutorial for a similar effect.
Thanks in advance for any help.
Here you go: http://jsfiddle.net/balupton/FZG3v/
You could use JavaScript and put this in a loop with a time lag and slide the value of MyVariable from Transparent to Opaque.
document.getElementById("MyImage").style.MozOpacity=MyVariable
精彩评论