编程论坛
注册
登录
编程论坛
→
ASP技术论坛
谁有这样的显示图片效果代码
mai_25
发布于 2011-02-11 17:22, 498 次点击
当鼠标划过缩略图片上,出现清晰的大图片。 例如:http://www.
1 回复
#2
gupiao175
2011-02-11 22:23
程序代码:
<div id=
"
showimg
"
style=
"
overflow:hidden;text-align:center;position:absolute;background:#fff;width:700px;height:550px;z-index:1001;
"
>
<div id=
'
smallpic' style="overflow:auto;margin-left:20px;width:150px;height:500px;background:#D2EDF6;float:left;display:inline;">
<ul style=
"
list-style:none;
"
>
<li><img src=
"
1.jpg
"
style=
"
width:90px;height:90px;
"
onclick=
"
showbig(this.src);
"
></img></li>
<li><img src=
"
2.jpg
"
style=
"
width:90px;height:90px;
"
onclick=
"
showbig(this.src);
"
></img></li>
<li><img src=
"
3.jpg
"
style=
"
width:90px;height:90px;
"
onclick=
"
showbig(this.src)
"
></img></li>
<li><img src=
"
4.jpg
"
style=
"
width:90px;height:90px;
"
onclick=
"
showbig(this.src)
"
></img></li>
<li><img src=
"
5.jpg
"
style=
"
width:90px;height:90px;
"
onclick=
"
showbig(this.src)
"
></img></li>
</ul>
</div>
<img id=
'
bigpic' style="float:right;width:500px;heigth:500px;margin-right:20px;"src="1.jpg"></img>
</div>
<script>
function
showbig(obj){
document.getElementById(
'
bigpic').src=obj;
};
</script>
这样可否,排版自己改!
1