.slideUp([duration][,complete])——目标元素向上滑入隐藏; .slideDown([duration][,complete])——目标元素向下滑出显示; .slideToggle([duration][,complete])——目标元素隐藏则向下滑出显示,否则向上滑入隐藏; 注:duration为方法执行的时间区间,complete为回调函数。 /*滑动效果*/ $(document).ready(function () { //向上滑入 $('#btn1').click(function () { $('img').slideUp(2000); }); //向下滑出 $('#btn2').click(function () { $('img').slideDown(2000); }); //切换滑动 $('#btn3').click(function () { $('img').slideToggle(2000); }); })