请问,鼠标移到图片时,此图片放大,鼠标离开图片时,此图片还原,这效果如果实现?? 建立一个div隐藏在小的图片下面,这个div里面放有这个小图片对应的大图片。这个div的style="display:none"在小图片的div上,写一个事件onmouseover, document.getElementById("大图片div的id")的style.display="block" ; 显示当鼠标离开时style.display="none" 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 考虑想就是触发鼠标的两个事件onmouseover和onmouseout首先 onmouseover="this.src='图片地址'"onmouseout=''..//类似 我把鼠标移动到控件的图片上时,在旁边出现一个层,放大的图片就在层里面,鼠标离开这个层时,这个层就隐藏, 请问能做到吗? 这个 在 DataBound 事件中给图片一个Attriburte(“onmouseover”,null,“《script》js《、script》”)出现一个层 那个先判断 图片的 位置 var l,t;while(e=e.offsetParent){l+=e.offsetLeftt+=e.offsetTop} 告诉你一种最简单的,不过可能显示效果可能不是很好<style>.thumbnail{position: relative;z-index: 0;}.thumbnail:hover{background-color: transparent;z-index: 50;}.thumbnail span{ /*CSS for enlarged image*/position: absolute;background-color: #eeeeee;padding: 5px;left: -10000px;border: 0px dashed gray;visibility: hidden;color: black;text-decoration: none;}.thumbnail span img{ /*CSS for enlarged image*/border-width: 0;padding: 2px;}.thumbnail:hover span{ /*CSS for enlarged image on hover*/visibility: visible;top: 20px;left: 60px; /*position where enlarged image should offset horizontally */right:60px;bottom:10px}</style> <a class="thumbnail" href="showimg.asp?id=1" target="_blank"><img src="1.jpg" width="100" height="70" border="0" /><span><img src="1.jpg" border="0" height="240" /><br />gdfgdfgdfgd</span></a> http://www.lanrentuku.com/lanren/jscode/js-0162/example5.html看看这个 可以参考一下用CSS的实现:简单的放大镜效果http://blog.doyoe.com/article.asp?id=111 建立一个div隐藏在小的图片下面,这个div里面放有这个小图片对应的大图片。这个div的style="display:none"在小图片的div上,写一个事件onmouseover, document.getElementById("大图片div的id")的style.display="block" ; 显示当鼠标离开时style.display="none"--------------------------------能不能在具体点写个方案??非常感谢! 如何简单用js写cookies根据浏览次数来限制按钮是打开连接还是弹出浮层呢? 怎么点击一个连接打开新网站的同时 起初页面也转向新的网址 js问题 急 div在IE7中能不能用hover,为什么不能正常显示呢? javascript字符串替换问题 请教怎样可以禁止输入某些字符等 AJAX小聊天室火狐不兼容 javascript如何保存网页中的修改 如何加快网页显示不受那些统计器影响 怎样判断鼠标到了单元格(TD)或div的边缘 如何用javascript比较两时间的大小 高手指点下 点击表格行,checkbox自动选中的问题
首先 onmouseover="this.src='图片地址'"
onmouseout=''..//类似
请问能做到吗?
这个 在 DataBound 事件中给图片一个Attriburte(“onmouseover”,null,“《script》js《、script》”)出现一个层 那个先判断 图片的 位置
var l,t;
while(e=e.offsetParent)
{
l+=e.offsetLeft
t+=e.offsetTop
}
position: relative;
z-index: 0;
}
.thumbnail:hover{
background-color: transparent;
z-index: 50;
}
.thumbnail span{ /*CSS for enlarged image*/
position: absolute;
background-color: #eeeeee;
padding: 5px;
left: -10000px;
border: 0px dashed gray;
visibility: hidden;
color: black;
text-decoration: none;
}
.thumbnail span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}
.thumbnail:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
top: 20px;
left: 60px; /*position where enlarged image should offset horizontally */
right:60px;
bottom:10px
}
</style>
<a class="thumbnail" href="showimg.asp?id=1" target="_blank"><img src="1.jpg" width="100" height="70" border="0" /><span><img src="1.jpg" border="0" height="240" /><br />gdfgdfgdfgd</span></a>
http://blog.doyoe.com/article.asp?id=111
--------------------------------
能不能在具体点写个方案??非常感谢!