标签:margin hid utf-8 过渡效果 style 鼠标移动 放大 html htm
<!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
标签:margin hid utf-8 过渡效果 style 鼠标移动 放大 html htm
原文地址:http://www.cnblogs.com/jianxian/p/7954910.html