fadeOut / fadeIn元素上的图像 [英] fadeOut/fadeIn image over element
本文介绍了fadeOut / fadeIn元素上的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前有一个图片覆盖的div,我目前使用下面的代码来淡出图片以显示下面的元素中的文本:
I currently have a div with a image overlaid that I am currently using the following code to fadeout the image to show the text in the element underneath:
$(".Content_Frame_Image").hover(
function() {
$(this).stop().animate({"opacity": "0"}, "slow");
},
function() {
$(this).stop().animate({"opacity": "1"}, "slow");
});
然而,因为im只使它看不见,我无法得到链接下面工作,你可以看到一个示例这里 http://playing.everythingcreative.co.uk
However because im only making it invisible I cant get the links to work underneath, you can see a sample here http://playing.everythingcreative.co.uk
如果我使用fadeout方法,它不会褪色悬停...
If I use the fadeout method then it wont fadein on hover...
推荐答案
>
what's about:
$(".Content_Frame_Container")
.each(function(){
$(this).find('.Content_Frame_Image');
})
.hover(
function(){
$(this).find('.Content_Frame_Image').stop().fadeOut('slow');
},
function(){
$(this).find('.Content_Frame_Image').stop().fadeIn('slow');
}
);
使用chrome dev-tools测试它 - 应该很好地工作。
tested it with chrome dev-tools -- should work nicely.
这篇关于fadeOut / fadeIn元素上的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文