js图片跟随效果
<img src="love.jpg" width="150" alt="">
<script type="text/javascript">
var oImg = document.querySelector("img");
document.onmouseover=function(e){
var e=e||event;
var x=e.pageX;
var y=e.pageY;
oImg.style.left=x-oImg.width/2+"px";
oImg.style.top=y-oImg.height/2+"px";
}
</script>