鼠标滑过图片图片放大

<!doctype html>
<html>
<head>
<style>
  img {
      display:block;
    }
  .imgbox {
      width:160px;
      border:solid 2px gray;
      height:120px;
      overflow:hidden;
    }
  .imgbox img {
      width:160px;
      height:120px;
      position:relative; 
      transition:all 1s;
    }
  .imgbox:hover img{
      -webkit-transform:scale(1.5,1.5);
    }
</style>
<meta charset="utf-8">
<title>css鼠标经过图片放大效果</title>
</head>

<body>

<div class="imgbox">
    <img src="https://inews.gtimg.com/newsapp_bt/0/5934412585/1000">
</div>

</body>
</html>

猜你喜欢

转载自blog.csdn.net/qq_37473645/article/details/83317095