这是一款鼠标悬浮在图片上以及鼠标在图片上移动时的动画,总共有8个特效,完整源码下载: http://pan.baidu.com/s/1pLLH3M7 密码: kvp5
效果预览
鼠标悬浮动画
部分js代码:
(function() {
var tiltSettings = [
{},
{
movement: {
imgWrapper : {
translation : {x: 10, y: 10, z: 30},
rotation : {x: 0, y: -10, z: 0},
reverseAnimation : {duration : 200, easing : 'easeOutQuad'}
},
lines : {
translation : {x: 10, y: 10, z: [0,70]},
rotation : {x: 0, y: 0, z: -2},
reverseAnimation : {duration : 2000, easing : 'easeOutExpo'}
},
caption : {
rotation : {x: 0, y: 0, z: 2},
reverseAnimation : {duration : 200, easing : 'easeOutQuad'}
},
overlay : {
translation : {x: 10, y: -10, z: 0},
rotation : {x: 0, y: 0, z: 2},
reverseAnimation : {duration : 2000, easing : 'easeOutExpo'}
},
shine : {
translation : {x: 100, y: 100, z: 0},
reverseAnimation : {duration : 200, easing : 'easeOutQuad'}
}
}
},
{
movement: {
imgWrapper : {
rotation : {x: -5, y: 10, z: 0},