鼠标移动到图片上图片逐渐变大、变清晰(带有过渡效果)

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>鼠标移动到图片上图片逐渐变大、变清晰(带有过渡效果)</title>
<style type="text/css">
div{
width: 300px;
height: 300px;
margin: 50px auto;
overflow: hidden;
filter:alpha(Opacity=50);
-moz-opacity:0.5;
opacity: 0.5;
}
div img{
cursor: pointer;
transition: all 0.6s;
-moz-transition: all 0.6s; /* 0.6s完成过渡效果 */
-webkit-transition: all 0.6s;
}
div img:hover{
transform: scale(1.2); /* 放大1.2倍 */
}
div:hover{
filter:alpha(Opacity=100);
-moz-opacity:1;
opacity: 1;
}
</style>
</head>
<body>
<div>
<img title="鼠标移上来,我变清晰了,逐渐变大了" src="http://new-img2.ol-img.com/375x375/115/638/liZVVgjbgJHDs.jpg" />
</div>
</body>
</html

posted @ 2017-12-02 17:31  剑仙6  阅读(1176)  评论(0编辑  收藏  举报
欢迎访问个人网站www.qingchun.在线