您的位置:首页 > Web前端 > CSS

CSS3 图片悬浮缩放效果

2015-12-01 17:27 676 查看
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题</title>
<style>
.demo1{
width:200px;
height:200px;
border:1px solid blue;
display: block;
padding:5px;
}
img{
-webkit-transition-duration: 0.5s;
-moz-transition-duration: 0.5s;
-o-transition-duration: 0.5s;
}
a:hover img{
-webkit-transform:scale(0.8);
-webkit-box-shadow:0px 0px 30px #ccc;
-moz-transform:scale(0.8);
-moz-box-shadow:0px 0px 30px #ccc;
-o-transform:scale(0.8);
-o-box-shadow:0px 0px 30px #ccc;
}
</style>
</head>
<body>
<a href="#" class="demo1">
<img src="1.jpg" width=200 height=200 alt="">
</a>
</body>
</html>




内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: