效果:将某一页面的图片收集在一起,实现单击任何一张图片,按原图片比例进行适当的缩放并在浏览器正中进行显示,有上一张、下一张功能。
<style type="text/css">
body{}
#imgexp{width:800px;height:500px;background:#000000;border:solid 10px #8B8B83;filter:alpha(opacity=70);-moz-opacity:0.7;opacity:0.7;position:fixed;top:20px;left:320px;z-index:190;}
#imgexp table{width:750px;height:450px;margin-left:25px;margin-top:25px;overflow:hidden;}
#imgexp .img_show{}
#imgexp #close{width:30px;height:30px;position:absolute;top:-20px;right:-20px;z-index:191;cursor:pointer;}
//覆盖层,使点击图片后后面的页面不能操作
#layer{z-index:10;width:100%;height:100%;position:fixed;background:#575757;top:0;left:0;filter:alpha(opacity=50);-moz-opacity:0.5;opacity:0.5;}
#imgexp #previous{position:absolute;top:45%;left:10px;cursor:pointer;}
#imgexp #next{position:absolute;top:45%;right:10px;cursor:pointer;}
</style>
<script type="text/javascript" src="JS/jquery.js"></script>
<script type="text/javascript">
var imgArray=new Array();
var img_current;
//用于初始化显示被点击的图像
function img_init(Img)
{
var img = new Image();
img.src = Img.src;
var width&