<div class="cursor"></div>
* {
  cursor: crosshair;
}
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid #000;
  transition: transform 0.1s cubic-bezier(0, 0.5, 1, 1), opacity 0.3s ease;
}
html:not(:hover) .cursor {
  opacity: 0;
}
var cursor = document.querySelector(".cursor");
var timeout;

window.addEventListener(
  "mousemove",
  function (e) {
    var x = e.clientX;
    var y = e.clientY;
    if (!timeout) {
      timeout = setTimeout(function () {
        timeout = null;
        cursor.style.transform = `translate3d(${x - 26}px, ${y - 26}px, 0)`;
      }, 20); //was 50
    }
  },
  false
);
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.