鼠标跟随效果代码 时间:2020-05-12 人气:0 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>Untitled Document</title> </head> <body> <img onerror="javascript:this.src='/skin1/img/error.jpg';" src="https://img.qb5200.com/download-x/20200511/25808.gif" style="position:absolute;z-index:10000;"> </body> <html> <script type="text/javascript"> document.onmousemove=function(e){ var e=e?e:window.event; var posx=e.clientX; var posy=e.clientY; document.images[0].style.left=posx+"px"; document.images[0].style.top=posy+"px"; } </script> [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] 加载全部内容