首页 > Web开发 > 详细

网页的图片放大效果

时间:2019-10-08 11:45:23      阅读:62      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>css3图片缓慢放大缩小</title>
    <style>
    .div{
        width: 500px;
        height: 500px;
        margin: 150px auto 0;
    }
    .div img{
        transition: all 2s ease 0s;
    }
    /* transition 别放hover里,放到img里,这样移入移出一样缓慢,不然只对hover移上去有缓慢效果 */
    .div img:hover{
        transform: scale(1.2);
        /*transition: all 2s ease-in-out 0s;*/
    }
    </style>
</head>
<body>
 
<div class="div">
    <img src="img/img-11-02.jpg">
</div>
 
</body>
</html>

 

网页的图片放大效果

原文:https://www.cnblogs.com/randon/p/11634399.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!