首页 > 其他 > 详细

鼠标移上去,使其偏移效果

时间:2018-07-09 10:06:44      阅读:93      评论:0      收藏:0      [点我收藏+]
 var a = n.pageX / 80,
                s = n.pageY / 280;
            $(".home-container .role-1").css({
                transform: "translate3d(" + a + "px, " + s + "px, 0px)",
                "-webkit-transform": "translate3d(" + a + "px, " + s + "px, 0px)",
                "-moz-transform": "translate3d(" + a + "px, " + s + "px, 0px)",
                "-o-transform": "translate3d(" + a + "px, " + s + "px, 0px)"
            });

代码如上,待有空时做个DOME挂上去

鼠标移上去,使其偏移效果

原文:https://www.cnblogs.com/wm218/p/9282206.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!