0 Replies Latest reply on Jul 19, 2016 6:46 AM by abhishek22anand

    parallax image effect




      I want to create a image parallax effect like this Hello | Bert  but I can't figure out how to make this.

      I have tried to with this code:


      var mouseX,mouseY;

      var myImg = document.getElementById("Stage_blue");

      mouseX = e.clientX + document.body.scrollLeft - myImg.offsetWidth/2;

      mouseY = e.clientY + document.body.scrollTop - myImg.offsetHeight/2;



      document.getElementById("Stage_blue").style.top = mouseY+"px";

      document.getElementById("Stage_blue").style.left = mouseX+"px";


      but it's not coming out properly. Also when I am trying to do center stage or Responsive scaling its not working.