js 实现效果图如下
代码如下
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
*{
margin: 0; padding: 0;}
.box{
width: 400px; height: 400px; border:1px solid black; margin:100px auto; position: relative; cursor: pointer;}
/*.box .pic{}*/
.box .pic img{
width: 400px; height: 400px;}