如何使div一直跟随在鼠标光标的右下角?
如何使div一直跟随在鼠标光标的右下角?
------解决方案-------------------- <body onmousemove= "mov() ">
<div id= "Layer1 " style= "position:absolute;WIDTH: 100px; HEIGHT: 25px; visibility: hidden; BACKGROUND-COLOR: navajowhite "> 层 </div>
</body>
function mov()
{
Layer1.style.visibility = 'visible ';
Layer1.style.left=event.clientX+10;
Layer1.style.top=event.clientY+10;
}