源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

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

  • 时间:2022-05-05 09:54 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:一个跟随鼠标的图片放大效果,与FF兼容
<div align=center style="overfow: hidden; width: 100px; height: 100px"><img src="http://files.jb51.net/upload/2007426163751315.jpg" width="100" height="100" border="0" onmouseover="show(this)" onmouseout="hide(this)"> </div> <div align=center style="overfow: hidden; width: 100px; height: 100px"> <img src="http://files.jb51.net/upload/200742616381460.jpg" width="100" height="100" border="0" onmouseover="show(this)" onmouseout="hide(this)"> </div> <div align=center style="overfow: hidden; width: 100px; height: 100px"> <img src="http://files.jb51.net/upload/200742616383849.jpg" width="100" height="100" border="0" onmouseover="show(this)" onmouseout="hide(this)"> </div> <div id="enlarge_images" style="position: absolute; z-index:2"></div> <SCRIPT>         function show(_this) {     document.getElementById("enlarge_images").innerHTML = "<img src='" + _this.src + "' >"; } function hide(_this) {     document.getElementById("enlarge_images").innerHTML = ""; } function move_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>
[Ctrl+A 全选 注:[url=http://www.1sucai.cn/article/23421.htm]如需引入外部Js需刷新才能执行[/url]]
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部