Html
    Css
    Js

    
                        
* {
	margin:0;
	padding:0;
}
#smallImg {
	width:300px;
	height:300px;
	position:relative;
}
#smallImg img {
	width:300px;
	height:300px;
}
#lay {
	position:absolute;
	left:0;
	top:0;
	border:1px solid #666;
	opacity:0.6;
	filter:alpha(opacity = 60);
	background:#fff;
	display:none;
	cursor:move;
}
#bigImg {
	width:300px;
	height:300px;
	position:absolute;
	left:320px;
	overflow:hidden;
	top:0;
	display:none;
}
#bigImg img {
	position:absolute;
	left:0;
	top:0;
}

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

js图片内放大镜效果

更新时间:2021-05-18 00:10:04

原生js内部放大镜效果

0