JS实现放大镜效果,供大家参考,具体内容如下
鼠标移到图片上就可以放大一块区域
代码:
document #small{ width: 700px; height: 340px; position: absolute; left: 70px; top: 100px; } #small img{ width: 100%; height: 100%; } #mark{ width: 200px; height: 200px; background-color:white; position: absolute; opacity: 0.5; filter: alpha(opacity=50); left: 0px; top: 0px; display: none; } #big{ width: 400px; height: 400px; border: 1px solid black; left: 800px; top: 100px; position: absolute; overflow: hidden; display: none; } #big img{ width: 1400px; height: 680px; position: absolute; left: 0px; top: 0px; }
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。



