首页 > Web开发 > 详细

HTML+css3 图片放大效果

时间:2018-07-21 13:21:27      阅读:207      评论:0      收藏:0      [点我收藏+]
<div class="enlarge">
    <img src="xx" alt="图片"/>
</div>              

第一种效果 超出不隐藏

.enlarge{
    width: 200px;
    height: 200px;
    border: 1px #ffffff solid;
}
.enlarge img{
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: all 0.6s;
    -ms-transition: all 0.8s;
}
.enlarge img:hover{
    transform: scale(1.2);
    -ms-transform: scale(1.2);
}

第二种效果 超出隐藏

.enlarge{
    width: 200px;
    height: 200px;
    overflow: hidden;
    border: 1px #ffffff solid;
}
.enlarge img{
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: all 0.6s;
    -ms-transition: all 0.8s;
}
.enlarge img:hover{
    transform: scale(1.2);
    -ms-transform: scale(1.2);
}

 

HTML+css3 图片放大效果

原文:https://www.cnblogs.com/yyr0208/p/9345980.html

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