本文实例为大家分享了js放大镜特效的实现代码,供大家参考,具体内容如下
document *{ margin: 0; padding: 0; } .imgBox{ width: 1000px; margin: auto; text-align: center; } .small,.large{ font-size: 0; outline: 1px solid burlywood; margin: auto; } .small{ margin: 20px auto; } .large{ } .small,.small img,.large{ width: 300px; height: 200px; overflow: hidden; } .large img{ width: 900px; height: 600px; } .small,.large{ position: relative; } .mark{ opacity: 0.5; background-color: #DEB887; z-index: 55; width: 100px; height: 66.666666666px; display: none; } .mark,.large img{ position: absolute; left: 0; top: 0; }
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持考高分网。



