티스토리 뷰

{
 function mousemove(e){
              let positionSlow = (e.pageX - (window.innerWidth/2)) * 0.1;
              let positionFast = (e.pageX - (window.innerWidth/2)) * 0.2;

              gsap.to(".spanSlow", {duration: 0.4, x: positionSlow});
              gsap.to(".spanFast", {duration: 0.4, x: positionFast});
              gsap.to(".cursor", {duration:0.3, left: e.pageX, top: e.pageY})
          }

          document.addEventListener("mousemove", mousemove);
}
댓글
© 2018 webstoryboy