鼠标经过元素放大离开缩小

1、代码:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS过度和变形效果演示</title>
  <style type="text/css">
    *{
      margin: 0;
      padding: 0;
    }
    .container{
      width: 158px;
      height: 183px;
      margin: 0 auto;
      border:1px solid #fad282;
      overflow: hidden;
    }
    .container img{
      transition: all 1.2s ease;
    }
    .container img:hover{
      transform: scale(1.2);
    }
  </style>
</head>
<body>
  <div class="container">
    <img src="html5.png" alt="html5.png">
  </div>
</body>
</html>

 

http://www.nxl123.cn/bokeyuan/2018080201/

posted @ 2018-08-02 17:16  本木木  阅读(456)  评论(0编辑  收藏  举报