开发者

How to make gallery image fade on hover to reveal details such as title, enlarge, visit site, etc?

开发者 https://www.devze.com 2023-01-08 05:47 出处:网络
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,

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

0

精彩评论

暂无评论...
验证码 换一张
取 消