.mouse-stalker {
  background: rgba(green, 0.4);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  transition:
    transform 0.6s,
    width .5s, height .5s,
    background-color .5s;
  transition-timing-function: ease-out;
  z-index: 999;

  @media screen and ( max-width: 599px ) {
    display: none;
  }
}
View Compiled
window.addEventListener('DOMContentLoaded', () => {
  const stalker = document.createElement('div');
  stalker.setAttribute('class', 'mouse-stalker');

  document.body.appendChild(stalker);

  const mouseMove = (e) => {
    stalker.style.transform = `translate(${e.clientX}px, ${e.clientY}px)`;
  }
  document.addEventListener('mousemove', mouseMove);
});
View Compiled

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css

External JavaScript

This Pen doesn't use any external JavaScript resources.