$('.small1').hover(function(){//此处使用传统函数方便
//console.log(this);//此处的this是DOM对象
//$(this).find('.mask').css('top':'0');//此处没有动画拉起的效果
$(this).find('.mask').animate({'top':'0'},100);
},
function(){
//$(this).find('.mask').css('top':'156');
$(this).find('.mask').animate({'top':'0'},100);
}
)
使用JQuery实现遮罩层效果,与DOM思路完全相同
最新推荐文章于 2022-07-21 09:40:42 发布