一个跟随鼠标的图片放大效果,初次写,老鸟包含//经5dyoy
2007-09-27 11:49
645 查看
<div align=center style="overfow: hidden; width: 100px; height: 100px"><img src="http://www.davison.com.cn/images/Thinktank_Treehouse.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://www.davison.com.cn/images/bike_d.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://www.davison.com.cn/images/paxingdan_pp.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>
</div>
<div align=center style="overfow: hidden; width: 100px; height: 100px">
<img src="http://www.davison.com.cn/images/bike_d.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://www.davison.com.cn/images/paxingdan_pp.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>
相关文章推荐
- 一个跟随鼠标的图片放大效果,与FF兼容
- 一个跟随鼠标的图片放大效果,与FF兼容
- 一个跟随鼠标的图片放大效果,与FF兼容
- 跟随鼠标的图片放大效果
- 鼠标放上去图片放大的一个效果(css)
- 当鼠标移动到图片上时跟随鼠标显示放大的图片效果
- 当鼠标移动到图片上时跟随鼠标显示放大的图片效果
- 制作跟随鼠标移动的图片放大效果
- 鼠标放在图片上面显示图片放大效果
- 鼠标悬停图片放大提示效果
- CSS3实现鼠标移动到图片上图片变大(缓慢变大,有过渡效果,放大的过程是有动画过渡的,这个过渡的时间可以自定义)
- js实现精美的图片跟随鼠标效果实例
- 使用jQuery编写的一个图片局部放大效果
- jq/css鼠标经过图片放大效果
- jQuery当鼠标悬停时放大图片的效果实例
- Android浏览图片,点击放大至全屏效果(包含点击前位置到全屏的动画)
- 用html语言实现鼠标悬停放大图片的效果的方法
- 仿照京东做的一个鼠标移上去的图片文字说明效果
- Jquery插件编写和图片跟随鼠标放大插件
- JQuery实现一个简单的鼠标跟随提示效果