谁帮忙给个代码

来源:百度知道 编辑:UC知道 时间:2024/05/17 11:03:53
我把图片放在表格中,100*100的大小,我现在想让鼠标移上去自动弹出一张实际大小的图,移开鼠标后图片又还原的特效有吗?
波迪的代码不错,可是鼠标在动的时候,图片一直闪啊,也就是说重复放大,变成一闪一闪的,能不能移出图片才关掉放大图?我用层的话不知道怎么显示隐藏。http://www.ksource.com.cn/credit.asp 右一,别扭啊

波迪代码写的不错,挺好的,但是欠点火候,看看我改进这个吧:

<div id="Layer1" style="display:none;position:absolute; left:276px; top:200px; width:60%; height:50%; z-index:1;"><img style="cursor:hand;" id="showPic" border='0'onMouseover="Layer1.style.display='';showPic.src=this.src"" onMouseOut="Layer1.style.display='none';showPic.src=this.src"> </div>
<img src="img/index1.jpg" width=784 height=300 onMouseover="Layer1.style.display='';showPic.src=this.src"" onMouseOut="Layer1.style.display='none';showPic.src=this.src">

是要做静态还是动态的呢?静太的就很好实现啊,用一个层就可以。

专业为您解答,不COPY,有疑问去我空间留言

用显示隐藏层

<div id="Layer1" style="display:none;position:absolute; left:276px; top:200px; width:60%; height:50%; z-index:1;"><img style="cursor:hand;" id="showPic" border='0'></div&