鼠标移到图片上图片放大【css3实例】

 1 <!DOCTYPE html>
 2 <html>
 3 <head>
 4 <meta charset="UTF-8">
 5 <title></title>
 6 <style type="text/css">
 7 #div1{
 8   width: 200px;
 9   height: 138px;
10   border: #000 solid 1px;
11   margin: 50px auto;
12   overflow: hidden;
13 }
14 #div1 img{
15   cursor: pointer;
16   transition: all 0.6s;
17 }
18 #div1 img:hover{
19   transform: scale(1.4);
20 }
21 </style>
22 </head>
23 <body>
24 <div id="div1">
25   <img src="demo.jpg" />
26 </div>
27 </body>
28 </html>

 

posted @ 2020-09-05 16:19  勤快的懒羊羊  阅读(183)  评论(0编辑  收藏  举报