%section#canvas
  #box
View Compiled
#box {
  position: absolute;
  width: 50px; 
  height: 50px;
  top: 50%; 
  left: 50%;
  margin: -25px 0 0 -25px;
  background: tomato;
  border-radius: 50%;
  -webkit-backface-visibility:hidden;
}
View Compiled
var $box = $('#box');
function moveBox (e) { 
  TweenMax.to( $box, 1.8, {
    css: { left: e.pageX, top: e.pageY },
    ease: Elastic.easeOut});
}
$(window).on('mousemove', moveBox);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js
  2. //cdnjs.cloudflare.com/ajax/libs/gsap/1.18.0/TweenMax.min.js