一个跟随鼠标的图片放大效果,与FF兼容
一个跟随鼠标的图片放大效果,与FF兼容
发布时间:2016-12-30 来源:查字典编辑
摘要:functionshow(_this){document.getElementById("enlarge_images").innerHTM...

<divalign=centerstyle="overfow:hidden;width:100px;height:100px"><imgsrc="http://files.jb51.net/upload/2007426163751315.jpg"width="100"height="100"border="0"onmouseover="show(this)"onmouseout="hide(this)">

</div>

<divalign=centerstyle="overfow:hidden;width:100px;height:100px">

<imgsrc="http://files.jb51.net/upload/200742616381460.jpg"width="100"height="100"border="0"onmouseover="show(this)"onmouseout="hide(this)">

</div>

<divalign=centerstyle="overfow:hidden;width:100px;height:100px">

<imgsrc="http://files.jb51.net/upload/200742616383849.jpg"width="100"height="100"border="0"onmouseover="show(this)"onmouseout="hide(this)">

</div>

<divid="enlarge_images"style="position:absolute;z-index:2"></div>

<SCRIPT>

functionshow(_this){

document.getElementById("enlarge_images").innerHTML="<imgsrc='"+_this.src+"'>";

}

functionhide(_this){

document.getElementById("enlarge_images").innerHTML="";

}

functionmove_layer(event){

event=event||window.event;

enlarge_images.style.left=event.clientX+document.body.scrollLeft+10;

enlarge_images.style.top=event.clientY+document.body.scrollTop+10;

}

document.onmousemove=move_layer;

</SCRIPT>

一个跟随鼠标的图片放大效果,与FF兼容1

一个跟随鼠标的图片放大效果,与FF兼容2

一个跟随鼠标的图片放大效果,与FF兼容3

[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新Javascript教程学习
热门Javascript教程学习
编程开发子分类