手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >一个跟随鼠标的图片放大效果,与FF兼容
一个跟随鼠标的图片放大效果,与FF兼容
摘要: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需刷新才能执行]

【一个跟随鼠标的图片放大效果,与FF兼容】相关文章:

网页里控制图片大小的相关代码

一个表格收缩展开的函数

图片按比例缩放函数

Javascript实现图片轮播效果(二)图片序列节点的控制实现

奇妙的Javascript图片放大镜

js实现精美的图片跟随鼠标效果实例

网站上面有这种切换效果

网页里控制图片大小的相关代码

js验证上传图片的方法

jQuery实现的多屏图像图层切换效果实例

精品推荐
分类导航