JQuery實現鼠標移動圖片顯示描述層的方法
更新時間:2015年06月25日 10:29:27 作者:任意球
這篇文章主要介紹了JQuery實現鼠標移動圖片顯示描述層的方法,涉及jQuery鼠標事件及動畫效果的使用技巧,需要的朋友可以參考下
本文實例講述了JQuery實現鼠標移動圖片顯示描述層的方法。分享給大家供大家參考。具體如下:
這里可結合 JQuery easing 的動畫來配合使用。
主要代碼如下:
$(".item").hover(
function()
{
//$(this).children("img").stop().animate({opacity: 0.8}, 700, "easeInSine");
$(this).children("div.title").stop().animate({top: 0}, 700, "easeOutBounce");
$(this).children("div.desc").stop().animate({bottom: 0}, 700, "easeOutBounce");
},
function(){
//$(this).children("img").stop().animate({opacity: 1}, 700);
$(this).children("div.title").stop().animate({top: -60}, 500);
$(this).children("div.desc").stop().animate({bottom: -40}, 400);
}
);
希望本文所述對大家的jQuery程序設計有所幫助。
相關文章
JQuery使用$.ajax和checkbox實現下次不在通知功能
這篇文章主要介紹了JQuery使用$.ajax和checkbox實現下次不在通知功能,本文給出HTML代碼、JS代碼、和后端JAVA代碼完整示例,需要的朋友可以參考下2015-04-04

