js 淘宝放大镜

一、CSS部分:
* {
padding: 0;
margin: 0;
}
#small img {
width: 300px;
height: 200px;
display: block;
}
#small {
width: 300px;
height: 200px;
border: 1px solid #efefef;
float: left;
position: relative;
margin: 100px;
}
#move {
width: 100px;
height: 100px;
background: rgba(233,23,45,0.3);
position: absolute;
left: 0;
top:0;
/display: none;/
}
#big {
width: 700px;
height: 500px;
float: left;
margin: 100px;
border: 1px solid #efefef;
position: relative;
overflow: hidden;
/display: none;/
}
#big_pic {
position: absolute;
left:0;
top:0;
}
二、HTML页面

三、JavaScript部分:

©️2020 CSDN 皮肤主题: 终极编程指南 设计师:CSDN官方博客 返回首页