JSFiddle - React, Tailwind, and code Playground
HTML
<div id="x_div"></div>
<div id="y_div"></div>
CSS
body{ margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; font-size:12px; background-color:#ececec;}
#x_div, #y_div { position:absolute; top:0;left:0; background-color:blue; width:100%; height:2px; }
#y_div { height:100%; width:2px; }
#Mouse{ position:absolute; display:none;color:blue;}
#Mouse strong{ color:#f00;}
JavaScript
function mouseMove(event){
var event = window.event || event;
var x_div = document.getElementById("x_div"),
y_div = document.getElementById("y_div");
x_div.style.top = event.clientY + "px";
y_div.style.left = event.clientX + "px";
}
document.onmousemove = mouseMove;