📜  元素跟随光标 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:47.907000             🧑  作者: Mango

代码示例1
window.addEventListener('mousemove', nutterbutter);  function nutterbutter(){     var _el = document.getElementById('woo');     _el.style.top = event.clientY + "px";     _el.style.left = event.clientX + "px"; }