jQuery实现滑动门效果_脚本分享网 -JS/jQuery代码 -演示与下载 -时代Java

Sliding door effect - TutsValley.com - DEMO


Hover over the images to see the effect.


Slide Right

Effect from the tutorial

Slide Left

This effect is made by changing the inside of the animate function in JQuery.

animate({ left : '-'+distance }

Just making it into negative number, everything else is same as the normal effect.

Slide Down

This is effect is made slightly different then in the tutorial.

var distance = $(this).outerHeight();
and
animate({ top : distance }

As you can see, the distance variable is now the height of the div instead of it's width.

Slide Up

This is effect is made slightly different then in the tutorial.

var distance = $(this).outerHeight();
and
animate({ top : '-' + distance }

Same as sliding down effect, but we are making it into a negative number.

代码整理:脚本分享网 

转载请注明出处,此代码仅供学习交流,请勿用于商业用途。

下载代码说明
X关闭

基于jquery来实现图片滑动门效果

jQuery实现的图片滑动效果,鼠标滑过图片,图片如同滑动的门一样可以向上、下、左、右四个方向滑动。