我喜欢它,所以当我将鼠标悬停在图像上时,整个图像变成链接而不仅仅是内部文本。有人可以帮我弄这个吗?悬停时图像淡入并使图像可点击
使用Javascript:
$('.thumbnail').hover(function() {
$('.thumbnail img').stop(true,true).fadeTo(400, 0.2);
$('.description').stop(true,true).fadeIn(400);
}, function() {
$('.thumbnail img').stop(true,true).fadeTo(400, 1);
$('.description').stop(true,true).fadeOut(400);
});
这里是的jsfiddle:http://jsfiddle.net/LDs6C/15/
啊 - 简单!只需将'a'设为块元素即可。 :) 谢谢! – J82 2011-02-16 23:14:14