I am trying onmousemove event js but I some issue I didn't solve, need to clear solution.
I have make onmousemove event but I need to control this speed how far it's speed. I need each span append tag should stuck each other like plain drawing no need any space among the span append tag. please see my snippet below for clear idea which I wanted.
document.onmousemove = doMove;
function doMove(e){
let body = document.querySelector('body');
let span = document.createElement('span');
let x = e.clientX;
let y = e.clientY;
body.appendChild(span);
span.style.left = x + 'px';
span.style.top = y + 'px';
}
span{
width: 15px;
height: 15px;
position: absolute;
background: red;
transition: .1s;
}