JSFiddle - React, Tailwind, and code Playground

HTML

<span></span>

<div class="dot">.</div>

CSS

.dot{
color:red;
    position:absolute;
    top: 10px;
    left: 22px;
}
span,div{
cursor:pointer;
}

JavaScript

$(document).mousemove(function(event) {
    var startingTop = 10,
        startingLeft = 22,
        math = Math.abs(((startingTop - event.clientY) + (startingLeft - event.clientX)) + 14) + 'px';
    $('span').text('From your starting point(22x10) you moved:   ' + math);
});