JS实现图片放大镜效果
代码:
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>.box{width: 500px;height: 300px;border: 1px solid;position: relative;img{width: 500px;height: 300px;}.active{width: 100px;height: 100px;background: rgba(255, 255, 0, 0.329);position: absolute;left: 0;top: 0;display: none;}}.box2{display: none;width: 500px;height: 300px;border: 1px solid;position: relative;