码迷,mamicode.com
首页 > Web开发 > 详细

css3 hover效果

时间:2017-05-26 00:48:25      阅读:482      评论:0      收藏:0      [点我收藏+]

标签:document   height   display   效果   flow   htm   round   order   body   

html代码:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
    * {
        margin: 0;
        padding: 0;
    }
    
    a {
        text-decoration: none;
        color: #333;
    }
    
    .box {
        width: 55px;
        height: 55px;
        overflow: hidden;
        display: block;
    }
    
    .box img {
        width: 55px;
        height: 55px;
        display: block;
        border-radius: 5px;
        float: left;
    }
    
    .box i {
        width: 55px;
        height: 55px;
        display: block;
        text-align: center;
        color: #888;
        font-size: 20px;
        line-height: 55px;
        transition: all .3s linear;
        -webkit-transition: all .3s linear;
        -moz-transition: all .3s linear;
        -o-transition: all .3s linear;
        -ms-transition: all .3s linear;
        font: normal 24px/55px Arial, Helvetica, sans-serif;
        background-color: #3F6F12;
    }
    
    .box:hover i {
        height: 0;
        line-height: 150px;
    }
    </style>
</head>

<body>
    <div class="box">
        <i>1</i>
        <img src="http://pic.2265.com/upload/2017-3/2017331931498082.png" />
    </div>
</body>

</html>

效果图:

技术分享

hover效果

技术分享

 

css3 hover效果

标签:document   height   display   效果   flow   htm   round   order   body   

原文地址:http://www.cnblogs.com/huanghuali/p/6906470.html

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