码迷,mamicode.com
首页 > 其他好文 > 详细

鼠标悬停,图片放大

时间:2017-11-14 19:43:15      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:color   图片放大   width   log   时间段   tail   poi   detail   cursor   

代码转载:http://blog.csdn.net/u014175572/article/details/51535768

示例:

<!DOCTYPE html>  
<html>  
    <head>  
        <meta charset="UTF-8">  
        <title></title>  
        <style type="text/css">  
            div{  
                width: 300px;  
                height: 300px;  
                border: #000 solid 1px;  
                margin: 50px auto;  
                overflow: hidden;  
            }  
            div img{  
                cursor: pointer;  
                transition: all 0.6s;  
            }  
            div img:hover{  
                transform: scale(1.4);  
            }  
        </style>  
    </head>  
    <body>  
        <div>  
            <img src="img/focus.png" />  
        </div>  
    </body>  
</html>  

 

transition: all 0.6s;表示所有的属性变化在0.6s的时间段内完成。

transform: scale(1.4);表示在鼠标放到图片上的时候图片按比例放大1.4倍。

 

鼠标悬停,图片放大

标签:color   图片放大   width   log   时间段   tail   poi   detail   cursor   

原文地址:http://www.cnblogs.com/wanlibingfeng/p/7833935.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!