Html
    Css
    Js

    
                        
 * {
	margin:0;
	padding:0;
}
.small_box {
	width:180px;
	height:180px;
	margin-left:10px;
	margin-top:10px;
	position:relative;
}
.small_box img {
	width:180px;
	height:180px;
}
.small_box .mask {
	position:absolute;
	width:100%;
	height:100%;
	background:rgba(0,0,0,0.5);
	opacity:0;
	z-index:2;
	cursor:move;
}
.small_box .float_layer {
	position:absolute;
	width:50px;
	height:50px;
	background:rgba(0,0,0,0.5);
	display:none;
}
.big_box {
	position:absolute;
	left:200px;
	top:10px;
	width:250px;
	height:250px;
	overflow:hidden;
	display:none;
}
.big_box img {
	position:absolute;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

jQuery放大镜(原创)

1
      Xin0
      2019/8/8 8:08:25
      var t = e.pagey - $(".small_box").offset().left 这里写错了var t = e.pagey - $(".small_box").offset().top 回复