Tooltip on mouse move
HTML
<div id="object"></div>
CSS
html, body {
width: 100%;
height: 100%;
overflow: hidden;
}
#object {
position: absolute;
margin: 0;
padding: 0;
background: #090;
width: 30px;
height: 30px;
border-radius: 50%;
box-shadow: 3px 3px 2px #999;
}
JavaScript
const o = document.getElementById('object');
document.body.onmousemove = e => {
o.style.left = (e.clientX - 15) + 'px';
o.style.top = (e.clientY - 15) + 'px';
}