图片放大镜

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script src="jquery.min.js"></script>
<script src="jquery.jqzoom.js"></script>
<script>
$(function(){
	$(".jqzoom").jqueryzoom({
					xzoom: 300, //放大图的宽度(默认是 200)
					yzoom: 300, //放大图的高度(默认是 200)
					offset: 10, //离原图的距离(默认是 10)
					position: "right", //放大图的定位(默认是 "right")
					preload:1   
	});
});
</script>
<style>
.pro_detail_left .jqzoom{
	border:1px solid #BBB;
	float:left;
	position:relative;
	padding:0px;
	cursor:pointer;
}

.pro_detail_left .fs {
	width:300px;
	height:300px; 
}

/*jQzoom*/
div.zoomdiv {
	z-index:	999;
	position                : absolute;
	top:0px;
	left:0px;
	width                   : 200px;
	height                  : 200px;
	background: #ffffff;
	border:1px solid #CCCCCC;
	display:none;
	text-align: center;
	overflow: hidden;
}
div.jqZoomPup {
	z-index                 : 999;
	visibility              : hidden;
	position                : absolute;
	top:0px;
	left:0px;
	width                   : 50px;
	height                  : 50px;
	border: 1px solid #aaa;
	background: #ffffff url(images/zoomlens.gif) 50% top  no-repeat;;
	opacity: 0.5;
	-moz-opacity: 0.5;
	-khtml-opacity: 0.5;
	filter: alpha(Opacity=50);
}
</style>
</head>

<body>
<div class="pro_detail">
		<div class="pro_detail_left">
			<div class="jqzoom"><img src="images/pro_img/blue_one_small.jpg" class="fs" alt="" jqimg="images/pro_img/blue_one_big.jpg"/>
			</div>
		</div>
</div>	
</body>
</html>


效果图:

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值